Skip to main content

获取聊天室全部属性

接口定义

/**
* 获取聊天室所有属性
*
* @param chatroomId 聊天室 id
* @param callback 完成回调
*/
void getAllAttributes(String chatroomId, IChatroomAttributesCallback callback);

interface IChatroomAttributesCallback {
/**
* 完成回调
*
* @param errorCode 返回 JErrorCode.NONE 时表示获取成功
* @param attributes 获取回来的属性列表
*/
void onComplete(int errorCode, Map<String, String> attributes);
}

示例代码

JIM.getInstance().getChatroomManager().getAllAttributes("chatroomId1", new IChatroomManager.IChatroomAttributesCallback() {
@Override
public void onComplete(int errorCode, Map<String, String> attributes) {

}
});