Public 成员函数 | |
| EMFetchMessageOption () | |
| void | setIsSave (boolean save) |
| void | setDirection (EMConversation.EMSearchDirection direction) |
| void | setFrom (String from) |
| void | setFromIds (List< String > fromIds) |
| void | setMsgTypes (List< EMMessage.Type > msgTypes) |
| void | setStartTime (long startTime) |
| void | setEndTime (long endTime) |
从服务端查询历史消息的参数配置类。
| com.hyphenate.chat.EMFetchMessageOption.EMFetchMessageOption | ( | ) |
构造函数。
| void com.hyphenate.chat.EMFetchMessageOption.setDirection | ( | EMConversation.EMSearchDirection | direction | ) |
设置消息的搜索方向。
| direction | 消息搜索方向。详见 EMConversation.EMSearchDirection。
|
| void com.hyphenate.chat.EMFetchMessageOption.setEndTime | ( | long | endTime | ) |
设置消息查询的结束时间。
| endTime | 消息查询的结束时间,Unix 时间戳,单位为毫秒。若传 -1,消息查询时会忽略该参数。
|
| void com.hyphenate.chat.EMFetchMessageOption.setFrom | ( | String | from | ) |
| void com.hyphenate.chat.EMFetchMessageOption.setFromIds | ( | List< String > | fromIds | ) |
设置群组会话中的消息发送方。
| fromIds | 消息的发送方的用户 IDs。 |
| void com.hyphenate.chat.EMFetchMessageOption.setIsSave | ( | boolean | save | ) |
设置获取的消息是否保存到数据库。
| save | 是否保存到数据库: -true:保存到数据库; -(默认)false:不保存到数据库。 |
| void com.hyphenate.chat.EMFetchMessageOption.setMsgTypes | ( | List< EMMessage.Type > | msgTypes | ) |
设置要查询的消息类型。
| msgTypes | 要查询的消息类型列表, 详见 EMStatisticsManager.EMSearchMessageType。 你可以设置多个消息类型。默认值 null,表示返回所有类型的消息。 |
| void com.hyphenate.chat.EMFetchMessageOption.setStartTime | ( | long | startTime | ) |
设置消息查询的起始时间。
| startTime | 消息查询的起始时间,Unix 时间戳,单位为毫秒。默认为 -1,表示消息查询时会忽略该参数。
|