搜索消息
根据关键字搜索
根据关键字搜索指定会话中的消息
方法
C #
int searchMessages(
RCIMConversationType type,
string targetId,
string channelId,
string keyword,
int startTime,
int count
)
参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| type | RCIMConversationType | 会话类型 |
| targetId | string | 会话ID |
| channelId | string | 暂不支持该参数。传 null 即可 |
| keyword | string | 搜索的关键字 |
| startTime | int | 查询 beginTime 之前的消息, 传 0 时从最新消息开始搜索,从该时间往前搜索。 |
| count | int | 查询的数量,count 大于 0,小于等于 50。 |
返回值
| 返回值 | 描述 |
|---|---|
| int | 当次接口操作状态码,并不代表最终操作结果,状态码详细信息 |
代码示例
C #
int code = engine.searchMessages(
type,
targetId,
channelId,
keyword,
startTime,
count
);