程序包 | 说明 |
---|---|
com.easemob.im.server.api.metadata | |
com.easemob.im.server.api.metadata.chatroom | |
com.easemob.im.server.api.metadata.chatroom.set |
限定符和类型 | 方法和说明 |
---|---|
reactor.core.publisher.Mono<ChatRoomMetadataSetResponse> |
MetadataApi.setChatRoomMetadata(String operator,
String chatroomId,
Map<String,String> metadata,
AutoDelete autoDelete)
设置聊天室属性
API使用示例:
EMService service;
Map<String, String> map = new HashMap<>();
map.put("nickname", "昵称");
map.put("avatarurl", "http://www.easemob.com/avatar.png");
map.put("phone", "159");
try {
service.metadata().setChatRoomMetadata("username", "roomId", map, AutoDelete.NO_DELETE).block();
} catch (EMException e) {
e.getErrorCode();
e.getMessage();
}
|
reactor.core.publisher.Mono<ChatRoomMetadataSetResponse> |
MetadataApi.setChatRoomMetadataForced(String operator,
String chatroomId,
Map<String,String> metadata,
AutoDelete autoDelete)
强制设置聊天室属性
API使用示例:
EMService service;
Map<String, String> map = new HashMap<>();
map.put("nickname", "昵称");
map.put("avatarurl", "http://www.easemob.com/avatar.png");
map.put("phone", "159");
try {
service.metadata().setChatRoomMetadataToUserForced("username", "roomId", map, AutoDelete.NO_DELETE).block();
} catch (EMException e) {
e.getErrorCode();
e.getMessage();
}
|
限定符和类型 | 方法和说明 |
---|---|
static AutoDelete |
AutoDelete.parse(String deleteType) |
static AutoDelete |
AutoDelete.valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static AutoDelete[] |
AutoDelete.values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
构造器和说明 |
---|
ChatRoomMetadataRequest(Map<String,String> metaData,
AutoDelete autoDelete) |
限定符和类型 | 方法和说明 |
---|---|
reactor.core.publisher.Mono<ChatRoomMetadataSetResponse> |
ChatRoomMetadataSet.toChatRoom(String operator,
String chatroomId,
Map<String,String> metadata,
AutoDelete autoDelete) |
reactor.core.publisher.Mono<ChatRoomMetadataSetResponse> |
ChatRoomMetadataSet.toChatRoomForced(String operator,
String chatroomId,
Map<String,String> metadata,
AutoDelete autoDelete) |
Copyright © 2024. All rights reserved.