#import <NIMQChatMessageManagerProtocol.h>
◆ addDelegate:
◆ areMentionedMeMessages:completion:
◆ cancelFetchingMessageAttachment:
取消收取消息附件
- 参数
-
@discussion 附件包括:图片消息的图片缩略图,视频消息的视频缩略图,音频消息的音频文件,文件消息的文件以及自定义消息中的自定义文件
◆ cancelSendingMessage:
◆ clearMessageCache
- (void) clearMessageCache |
|
|
|
◆ deleteMessage:completion:
◆ deleteTextCache:channelId:
- (BOOL) deleteTextCache: |
|
(unsigned long long) |
serverId |
channelId: |
|
(unsigned long long) |
channelId |
|
|
| |
删除缓存数据。 serverId > 0 && channelId > 0:删除指定频道的数据 serverId > 0 && channelId == 0:删除指定服务器下所有频道的数据 serverId == 0 && channelId > 0:删除指定频道ID的数据 serverId == 0 && channelId == 0:清空数据
- 参数
-
serverId | 服务器ID,大于等于0 |
channelId | 频道ID,大于等于0 |
- 返回
- YES:完成删除操作,包括数据存在的删除和数据不存在的删除;NO:其它
◆ fetchMessageAttachment:error:
- (BOOL) fetchMessageAttachment: |
|
(NIMQChatMessage *) |
message |
error: |
|
(NSError *__nullable *) |
error |
|
|
| |
收取消息附件
- 参数
-
- 返回
- 是否调用成功 @discussion 附件包括:图片消息的图片缩略图,视频消息的视频缩略图,音频消息的音频文件,文件消息的文件以及自定义消息中的自定义文件
◆ forwardMessage:toSession:error:
转发消息
- 参数
-
message | 消息 |
session | 接收方 |
error | 错误 如果在准备发送消息阶段发生错误,这个error会被填充相应的信息 |
- 返回
- 是否调用成功,这里返回的 result 只是表示当前这个函数调用是否成功,需要后续的回调才能够判断消息是否已经发送至服务器
◆ getLastMessageOfChannels:completion:
◆ getMentionedMeMessages:completion:
◆ getMessageCache:completion:
◆ getMessageHistory:completion:
◆ getMessageHistoryByIds:completion:
◆ getTextCache:channelId:
- (nullable NSString *) getTextCache: |
|
(unsigned long long) |
serverId |
channelId: |
|
(unsigned long long) |
channelId |
|
|
| |
◆ insertOrReplaceTextCache:channelId:value:
- (BOOL) insertOrReplaceTextCache: |
|
(unsigned long long) |
serverId |
channelId: |
|
(unsigned long long) |
channelId |
value: |
|
(NSString *) |
value |
|
|
| |
增加一条缓存数据,如果该频道下已经存在数据,则被新数据覆盖。
- 参数
-
serverId | 服务器ID,大于0 |
channelId | 频道ID,大于0 |
text | 要增加的内容,不能是空指针 |
- 返回
- YES:成功添加或者替换;NO:其它
◆ makeForwardMessage:error:
生成转发消息 得到转发消息后,开发者需自己再调用sendForwardMessage:toSession:error: 进行发送, 和 直接调用forwardMessage:toSession:error:效果一样,但是这样可以得到转发消息的进度方法回调和是否转发成功方法回调
- 参数
-
message | 要转发的消息 |
error | 错误 如果在准备发送消息阶段发生错误,这个error会被填充相应的信息 |
- 返回
- 生成的需要转发的消息
◆ markMessageRead:completion:
◆ markSystemNotificationsRead:completion:
◆ messageInTransport:
消息是否正在传输 (发送/接受附件)
- 参数
-
- 返回
- 是否正在传输
◆ messageTransportProgress:
传输消息的进度 (发送/接受附件)
- 参数
-
- 返回
- 正在传输的消息进度,如果消息不在传输,则返回0
◆ removeDelegate:
◆ resendMessage:error:
- (BOOL) resendMessage: |
|
(NIMQChatMessage *) |
message |
error: |
|
(NSError *__nullable *) |
error |
|
|
| |
重发消息
- 参数
-
message | 重发消息 |
error | 错误 如果在准备发送消息阶段发生错误,这个error会被填充相应的信息 |
- 返回
- 是否调用成功,这里返回的 result 只是表示当前这个函数调用是否成功,需要后续的回调才能够判断消息是否已经发送至服务器
◆ resendSystemNotification:completion:
◆ revokeMessage:completion:
◆ searchMsgByPage:completion:
◆ sendForwardMessage:toSession:error:
- (BOOL) sendForwardMessage: |
|
(NIMQChatMessage *) |
message |
toSession: |
|
(NIMSession *) |
session |
error: |
|
(NSError *__nullable *) |
error |
|
|
| |
发送生成的转发消息
- 参数
-
message | 转发的消息 |
session | 接受方 |
error | 错误 如果在准备发送消息阶段发生错误,这个error会被填充相应的信息 |
- 返回
- 是否调用成功,这里返回的 result 只是表示当前这个函数调用是否成功,需要后续的回调才能够判断消息是否已经发送至服务器
◆ sendMessage:toSession:completion:
异步发送消息
- 参数
-
message | 消息 |
session | 接收方 |
completion | 发送完成后的回调,这里的回调完成只表示当前这个函数调用完成,需要后续的回调才能判断消息是否已经发送至服务器 |
◆ sendMessage:toSession:error:
发送消息
- 参数
-
message | 消息 |
session | 接受方 |
error | 错误 如果在准备发送消息阶段发生错误,这个error会被填充相应的信息 |
- 返回
- 是否调用成功,这里返回的 result 只是表示当前这个函数调用是否成功,需要后续的回调才能够判断消息是否已经发送至服务器
◆ sendMessageTypingEvent:completion:
◆ sendSystemNotification:completion:
◆ updateMessage:completion:
更新圈组消息 @discussion 支持文本,服务器扩展,自定义消息状态
- 参数
-
◆ updateSystemNotification:completion:
该协议的文档由以下文件生成: