Chat SDK for Unity and Windows v1.2.0
Public Attributes | List of all members
AgoraChat.FetchServerMessagesOption Class Reference
Inheritance diagram for AgoraChat.FetchServerMessagesOption:

Public Attributes

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

Detailed Description

The parameter configuration class for pulling historical messages from the server.

Member Data Documentation

◆ IsSave

bool AgoraChat.FetchServerMessagesOption.IsSave

Whether to save the obtained messages to the database: -true: Yes; -(Default) false:No.

◆ Direction

MessageSearchDirection AgoraChat.FetchServerMessagesOption.Direction = MessageSearchDirection.UP

The message search direction. See MessageSearchDirection.

◆ From

string AgoraChat.FetchServerMessagesOption.From

The user ID of the message sender.

This attribute is used only for group message.

◆ MsgTypes

List<MessageBodyType> AgoraChat.FetchServerMessagesOption.MsgTypes

The list of message types for query. The default is empty, indicating that all types of messages are retrieved.

◆ StartTime

long AgoraChat.FetchServerMessagesOption.StartTime = -1

The start time for message query. The time is a UNIX timestamp in milliseconds.

The default value is -1, indicating that this parameter is ignored during message query.

If the start time is set to a specific time spot and the end time uses the default value -1, the SDK returns messages that are sent and received in the period that is from the start time to the current time.

If the start time uses the default value -1 and the end time is set to a specific time spot, the SDK returns messages that are sent and received in the period that is from the timestamp of the first message to the current time.

◆ EndTime

long AgoraChat.FetchServerMessagesOption.EndTime = -1

The end time for message query. The time is a UNIX time stamp in milliseconds.

The default value is -1, indicating that this parameter is ignored during message query.

If the start time is set to a specific time spot and the end time uses the default value -1, the SDK returns messages that are sent and received in the period that is from the start time to the current time.

If the start time uses the default value -1 and the end time is set to a specific time spot, the SDK returns messages that are sent and received in the period that is from the timestamp of the first message to the current time.