Chat SDK for Unity and Windows v1.2.0
Public 属性 | 所有成员列表
AgoraChat.FetchServerMessagesOption类 参考
类 AgoraChat.FetchServerMessagesOption 继承关系图:

Public 属性

bool IsSave
 
MessageSearchDirection Direction = MessageSearchDirection.UP
 
string From
 
List< MessageBodyTypeMsgTypes
 
long StartTime = -1
 
long EndTime = -1
 

详细描述

从服务端查询历史消息的参数配置类。

类成员变量说明

◆ IsSave

bool AgoraChat.FetchServerMessagesOption.IsSave

获取的消息是否保存到数据库: -true:保存到数据库; -(默认)false:不保存到数据库。

◆ Direction

MessageSearchDirection AgoraChat.FetchServerMessagesOption.Direction = MessageSearchDirection.UP

消息搜索方向,详见 MessageSearchDirection

◆ From

string AgoraChat.FetchServerMessagesOption.From

消息发送方的用户 ID。

仅用于群组消息。

◆ MsgTypes

List<MessageBodyType> AgoraChat.FetchServerMessagesOption.MsgTypes

要查询的消息类型列表,默认为空,表示返回所有类型的消息。

◆ StartTime

long AgoraChat.FetchServerMessagesOption.StartTime = -1

消息查询的起始时间,Unix 时间戳,单位为毫秒。默认为 -1,表示消息查询时会忽略该参数。

若起始时间设置为特定时间点,而结束时间采用默认值 -1,则查询起始时间至当前时间的消息。

若起始时间采用默认值 -1,而结束时间设置了特定时间,SDK 返回从会话中最早的消息到结束时间点的消息。

◆ EndTime

long AgoraChat.FetchServerMessagesOption.EndTime = -1

消息查询的结束时间,Unix 时间戳,单位为毫秒。默认为 -1,表示消息查询时会忽略该参数。

若起始时间设置为特定时间点,而结束时间采用默认值 -1,则查询起始时间至当前时间的消息。

若起始时间采用默认值 -1,而结束时间设置了特定时间,SDK 返回从会话中最早的消息到结束时间点的消息。