NIMSDK-iOS
|
#import <NIMQChatMessageManagerProtocol.h>
圈组消息管理器
- (void) addDelegate: | (id< NIMQChatMessageManagerDelegate >) | delegate |
添加通知对象
delegate | 通知对象 |
- (void) areMentionedMeMessages: | (NIMQChatAreMentionedMeMessagesParam *) | param | |
completion: | (nullable NIMQChatAreMentionedMeMessagesHandler) | completion | |
批量查询消息是否 @ 当前用户
param | 传入参数 |
completion | 结果回调 |
- (void) cancelFetchingMessageAttachment: | (NIMQChatMessage *) | message |
取消收取消息附件
message | 需要取消收取附件的消息 |
@discussion 附件包括:图片消息的图片缩略图,视频消息的视频缩略图,音频消息的音频文件,文件消息的文件以及自定义消息中的自定义文件
- (BOOL) cancelSendingMessage: | (NIMQChatMessage *) | message |
取消正在发送的消息
message | 目标消息 |
- (void) clearMessageCache |
清理消息本地缓存
- (void) deleteMessage: | (NIMQChatDeleteMessageParam *) | param | |
completion: | (nullable NIMQChatUpdateMessageHandler) | completion | |
删除圈组消息 @discussion
param | 传入参数 |
completion | 结果回调 |
- (BOOL) fetchMessageAttachment: | (NIMQChatMessage *) | message | |
error: | (NSError *__nullable *) | error | |
收取消息附件
message | 需要收取附件的消息 |
error | 错误 |
- (BOOL) forwardMessage: | (NIMQChatMessage *) | message | |
toSession: | (NIMSession *) | session | |
error: | (NSError *__nullable *) | error | |
转发消息
message | 消息 |
session | 接收方 |
error | 错误 如果在准备发送消息阶段发生错误,这个error会被填充相应的信息 |
- (void) getLastMessageOfChannels: | (NIMQChatGetLastMessageOfChannelsParam *) | param | |
completion: | (nullable NIMQChatGetLastMessageOfChannelsHandler) | completion | |
批量查询频道最后一条消息
param | 传入参数 |
completion | 结果回调 |
- (void) getMentionedMeMessages: | (NIMQChatGetMentionedMeMessagesParam *) | param | |
completion: | (nullable NIMQChatGetMentionedMeMessagesHandler) | completion | |
搜索圈组 @ 我的消息
param | 传入参数 |
completion | 结果回调 |
- (void) getMessageCache: | (NIMQChatGetMessageCacheParam *) | param | |
completion: | (nullable NIMQChatGetMessageCacheHandler) | completion | |
从本地缓存查询消息
param | 传入参数 |
completion | 结果回调 |
- (void) getMessageHistory: | (NIMQChatGetMessageHistoryParam *) | param | |
completion: | (nullable NIMQChatGetMessageHistoryHandler) | completion | |
从服务端查询历史消息
param | 传入参数 |
completion | 结果回调 |
- (void) getMessageHistoryByIds: | (NIMQChatGetMessageHistoryByIdsParam *) | param | |
completion: | (nullable NIMQChatGetMessageHistoryHandler) | completion | |
从服务端按ID查询历史消息
param | 传入参数 |
completion | 结果回调 |
- (nullable NIMQChatMessage *) makeForwardMessage: | (NIMQChatMessage *) | message | |
error: | (NSError *__nullable *) | error | |
生成转发消息 得到转发消息后,开发者需自己再调用sendForwardMessage:toSession:error: 进行发送, 和 直接调用forwardMessage:toSession:error:效果一样,但是这样可以得到转发消息的进度方法回调和是否转发成功方法回调
message | 要转发的消息 |
error | 错误 如果在准备发送消息阶段发生错误,这个error会被填充相应的信息 |
- (void) markMessageRead: | (NIMQChatMarkMessageReadParam *) | param | |
completion: | (nullable NIMQChatHandler) | completion | |
标记消息已读
param | 传入参数 |
completion | 结果回调 |
- (void) markSystemNotificationsRead: | (NIMQChatMarkSystemNotificationsReadParam *) | param | |
completion: | (nullable NIMQChatHandler) | completion | |
标记系统通知已读
param | 传入参数 |
completion | 结果回调 |
- (BOOL) messageInTransport: | (NIMQChatMessage *) | message |
消息是否正在传输 (发送/接受附件)
message | 消息 |
- (float) messageTransportProgress: | (NIMQChatMessage *) | message |
传输消息的进度 (发送/接受附件)
message | 消息 |
- (void) removeDelegate: | (id< NIMQChatMessageManagerDelegate >) | delegate |
移除通知对象
delegate | 通知对象 |
- (BOOL) resendMessage: | (NIMQChatMessage *) | message | |
error: | (NSError *__nullable *) | error | |
重发消息
message | 重发消息 |
error | 错误 如果在准备发送消息阶段发生错误,这个error会被填充相应的信息 |
- (void) resendSystemNotification: | (NIMQChatResendSystemNotificationParam *) | param | |
completion: | (nullable NIMQChatSendSystemNotificationHandler) | completion | |
重发自定义系统通知
param | 传入参数 |
completion | 结果回调 |
- (void) revokeMessage: | (NIMQChatRevokeMessageParam *) | param | |
completion: | (nullable NIMQChatUpdateMessageHandler) | completion | |
撤回圈组消息 @discussion
param | 传入参数 |
completion | 结果回调 |
- (void) searchMsgByPage: | (NIMQChatSearchMsgByPageParam *) | param | |
completion: | (nullable NIMQChatSearchMsgByPageHandler) | completion | |
搜索圈组消息
param | 传入参数 |
completion | 结果回调 |
- (BOOL) sendForwardMessage: | (NIMQChatMessage *) | message | |
toSession: | (NIMSession *) | session | |
error: | (NSError *__nullable *) | error | |
发送生成的转发消息
message | 转发的消息 |
session | 接受方 |
error | 错误 如果在准备发送消息阶段发生错误,这个error会被填充相应的信息 |
- (void) sendMessage: | (NIMQChatMessage *) | message | |
toSession: | (NIMSession *) | session | |
completion: | (nullable NIMQChatHandler) | completion | |
异步发送消息
message | 消息 |
session | 接收方 |
completion | 发送完成后的回调,这里的回调完成只表示当前这个函数调用完成,需要后续的回调才能判断消息是否已经发送至服务器 |
- (BOOL) sendMessage: | (NIMQChatMessage *) | message | |
toSession: | (NIMSession *) | session | |
error: | (NSError *__nullable *) | error | |
发送消息
message | 消息 |
session | 接受方 |
error | 错误 如果在准备发送消息阶段发生错误,这个error会被填充相应的信息 |
- (void) sendMessageTypingEvent: | (NIMQChatMessageTypingEvent *) | param | |
completion: | (nullable NIMQChatSendMessageTypingEventHandler) | completion | |
发送正在输入等自定义事件
param | 传入参数 |
completion | 结果回调 |
- (void) sendSystemNotification: | (NIMQChatSendSystemNotificationParam *) | param | |
completion: | (nullable NIMQChatSendSystemNotificationHandler) | completion | |
发送自定义系统通知
param | 传入参数 |
completion | 结果回调 |
- (void) updateMessage: | (NIMQChatUpdateMessageParam *) | param | |
completion: | (nullable NIMQChatUpdateMessageHandler) | completion | |
更新圈组消息 @discussion 支持文本,服务器扩展,自定义消息状态
param | 传入参数 |
completion | 结果回调 |
- (void) updateSystemNotification: | (NIMQChatUpdateSystemNotificationParam *) | param | |
completion: | (nullable NIMQChatUpdateSystemNotificationHandler) | completion | |
更新系统通知(可以更新状态、也可以更新内容)