NIMSDK-iOS
|
#import <NIMChatroomManagerProtocol.h>
聊天室管理器
- (void) addDelegate: | (id< NIMChatroomManagerDelegate >) | delegate |
添加通知对象
delegate | 通知对象 |
- (void) batchUpdateChatroomQueueObject: | (NIMChatroomQueueBatchUpdateRequest *) | request | |
completion: | (nullable NIMChatroomQueueBatchUpdateHandler) | completion | |
批量更新聊天室通用队列元素,权限由 NIMChatroom 的 queueModificationLevel 决定
request | 聊天室队列批量请求 |
completion | 请求回调 |
- (NSInteger) chatroomAuthMode: | (NSString *) | roomId |
聊天室登录使用的模式
roomId | 聊天室ID |
- (void) dropChatroomQueue: | (NSString *) | roomId | |
completion: | (nullable NIMChatroomHandler) | completion | |
删除聊天室队列,权限由 NIMChatroom 的 queueModificationLevel 决定
roomId | 聊天室ID |
completion | 请求回调 |
- (void) enterChatroom: | (NIMChatroomEnterRequest *) | request | |
completion: | (nullable NIMChatroomEnterHandler) | completion | |
进入聊天室
request | 进入聊天室请求 |
completion | 进入完成后的回调 |
- (void) exitChatroom: | (NSString *) | roomId | |
completion: | (nullable NIMChatroomHandler) | completion | |
离开聊天室
roomId | 聊天室ID |
completion | 离开聊天室的回调 |
- (void) fetchChatroomInfo: | (NSString *) | roomId | |
completion: | (nullable NIMChatroomInfoHandler) | completion | |
获取聊天室信息
roomId | 聊天室ID |
completion | 获取聊天室信息的回调 @discussion 只有已进入聊天室才能够获取对应的聊天室信息 |
- (void) fetchChatroomMembers: | (NIMChatroomMemberRequest *) | request | |
completion: | (nullable NIMChatroomMembersHandler) | completion | |
获取聊天室成员
request | 获取成员请求 |
completion | 请求完成回调 |
- (void) fetchChatroomMembersByIds: | (NIMChatroomMembersByIdsRequest *) | request | |
completion: | (nullable NIMChatroomMembersHandler) | completion | |
根据用户ID获取聊天室成员信息
request | 获取成员请求 |
completion | 请求完成回调 |
- (void) fetchChatroomMembersByTag: | (NIMChatroomFetchMembersByTagRequest *) | request | |
completion: | (nullable NIMChatroomMembersHandler) | completion | |
根据标签获取聊天室内该标签下的成员
request | 获取标签成员请求 |
completion | 请求完成回调 |
- (void) fetchChatroomQueue: | (NSString *) | roomId | |
completion: | (nullable NIMChatroomQueueInfoHandler) | completion | |
获取聊天室队列
roomId | 聊天室ID |
completion | 请求回调 |
- (void) fetchMessageHistory: | (NSString *) | roomId | |
option: | (NIMHistoryMessageSearchOption *) | option | |
result: | (nullable NIMFetchChatroomHistoryBlock) | result | |
查询服务器保存的聊天室消息记录
roomId | 聊天室ID |
option | 查询选项 |
result | 完成回调 |
- (void) getMessagesByTags: | (NIMGetMessagesByTagsParam *) | param | |
completion: | (nullable NIMGetMessagesByTagsHandler) | completion | |
通过标签查询消息
param | 查询参数 |
completion | 完成回调 |
- (void) kickMember: | (NIMChatroomMemberKickRequest *) | request | |
completion: | (nullable NIMChatroomHandler) | completion | |
将特定成员踢出聊天室
request | 踢出请求 |
completion | 请求回调 |
- (void) markMemberManager: | (NIMChatroomMemberUpdateRequest *) | request | |
completion: | (nullable NIMChatroomHandler) | completion | |
标记为聊天室管理员
request | 更新请求 |
completion | 请求回调 |
- (void) markNormalMember: | (NIMChatroomMemberUpdateRequest *) | request | |
completion: | (nullable NIMChatroomHandler) | completion | |
标记为聊天室普通成员
request | 更新请求 |
completion | 请求回调 |
- (void) queryChatroomMembersCountByTag: | (NIMChatroomQueryMembersCountByTagRequest *) | request | |
completion: | (nullable NIMChatroomMembersCountHandler) | completion | |
根据标签查询聊天室内该标签下的在线成员数量
request | 获取标签成员数量请求 |
completion | 请求完成回调 |
- (void) removeChatroomQueueObject: | (NIMChatroomQueueRemoveRequest *) | request | |
completion: | (nullable NIMChatroomQueueRemoveHandler) | completion | |
移除聊天室队列元素,权限由 NIMChatroom 的 queueModificationLevel 决定
request | 拉取请求 |
completion | 请求回调 |
- (void) removeDelegate: | (id< NIMChatroomManagerDelegate >) | delegate |
移除通知对象
delegate | 通知对象 |
- (void) tempMuteTag: | (NIMChatroomTempMuteTagRequest *) | request | |
completion: | (NIMChatroomHandler) | completion | |
针对标签更新聊天室临时禁言状态
request | 更新请求 |
duration | 临时禁言时长,单位为秒 |
completion | 请求回调 |
- (void) updateChatroomInfo: | (NIMChatroomUpdateRequest *) | request | |
completion: | (nullable NIMChatroomHandler) | completion | |
修改聊天室信息
request | 聊天室修改请求 |
completion | 修改后完成的回调 |
- (void) updateChatroomQueueObject: | (NIMChatroomQueueUpdateRequest *) | request | |
completion: | (nullable NIMChatroomHandler) | completion | |
加入或者更新聊天室通用队列元素,权限由 NIMChatroom 的 queueModificationLevel 决定
request | 聊天室队列请求 |
completion | 请求回调 |
- (void) updateLocation: | (nonnull NIMChatroomLocation *) | location | |
completion: | (nullable NIMChatroomHandler) | completion | |
更新坐标
location | 当前坐标和有效距离 |
completion | 请求完成回调 |
- (void) updateMemberBlack: | (NIMChatroomMemberUpdateRequest *) | request | |
completion: | (nullable NIMChatroomHandler) | completion | |
更新用户聊天室黑名单状态
request | 更新请求 |
completion | 请求回调 |
- (void) updateMemberMute: | (NIMChatroomMemberUpdateRequest *) | request | |
completion: | (nullable NIMChatroomHandler) | completion | |
更新用户聊天室静言状态
request | 更新请求 |
completion | 请求回调 |
- (void) updateMemberTempMute: | (NIMChatroomMemberUpdateRequest *) | request | |
duration: | (unsigned long long) | duration | |
completion: | (nullable NIMChatroomHandler) | completion | |
更新用户聊天室临时禁言状态
request | 更新请求 |
duration | 临时禁言时长,单位为秒 |
completion | 请求回调 |
- (void) updateMyChatroomMemberInfo: | (NIMChatroomMemberInfoUpdateRequest *) | request | |
completion: | (nullable NIMChatroomHandler) | completion | |
修改自己在聊天室内的个人信息
request | 个人信息更新请求 |
completion | 修改完成后的回调 |
- (void) updateTags: | (nonnull NIMChatroomTagsUpdate *) | tags | |
completion: | (nullable NIMChatroomHandler) | completion | |
更新标签
tags | 标签 |
completion | 请求完成回调 |