程序包 | 说明 |
---|---|
com.easemob.im.server.api.metadata | |
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();
}
|
限定符和类型 | 方法和说明 |
---|---|
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.