Chat / Flutter
Chat Flutter v3
Chat Flutter
Chat
Flutter
Version 3
Home
/
Chat
/
Flutter
/
Message

List changelogs of messages

Each message changelog has distinct properties such as the timestamp of an updated message or the unique ID of a deleted message. Based on these two properties, you can retrieve message changelogs using either the timestamp or the token. The getMessageChangeLogs() method require a MessageChangeLogsParams object as their parameter to determine which messages to return.

MessageChangeLogsParams

Property nameTypeDescription

includePollDetails

boolean

Determines whether to include a poll resource representation in the results. (Default: false)

includeMetaArray

boolean

Determines whether to include the message's meta-array information in the results. (Default: false)

includeReactions

boolean

Determines whether to include the message reactions in the results. (Default: false)

includeParentMessageInfo

boolean

Determines whether to include the information of the parent messages in the result. (Default: false)

replyType

string

Specifies the type of message to include in the results.
- NONE (default): Includes unthreaded messages and only the parent messages of threaded messages.
- ALL: Includes both threaded and unthreaded messages.
- ONLY_REPLY_TO_CHANNEL: Includes unthreaded messages, parent messages of threaded messages, and messages sent to the channel as replies with the reply_to_channel property set to true.

includeThreadInfo

boolean

Determines whether to include the thread information of the messages in the result. (Default: false)

includeReplies

boolean

(Deprecated) Determines whether to include message replies in the result. Use includeParentMessageInfo instead.

includeParentMessageText

boolean

(Deprecated) Determines whether to include the parent message text in the results when the messages are replies in a thread. If the type of the parent message is UserMessage, the value is a message property. If it is FileMessage, the value is the name of the uploaded file. Use replyType instead.


By timestamp

You can retrieve the message changelogs by specifying a timestamp. The results only include changelogs that were created after the specified timestamp.

final logParams = MessageChangeLogParams()
        ..replyType = ReplyType.none
        ..includeParentMessageInfo = true;
      final res = await channel.getMessageChangeLogs(
        timestamp: timestamp,
        params: logParams,
      );

List of parameters

Parameter nameTypeDescription

timestamp

long

Specifies a timestamp to be the reference point for the changelogs to be retrieved, in Unix milliseconds format.

params

MessageChangeLogsParams

Contains a set of parameters you can use when retrieving changelogs.


By token

You can also retrieve message changelogs by specifying a token. The token is an opaque string that marks the starting point of the next page in the result set and it's included in the callback of the previous call. Based on the token, the next page starts with changelogs that were created after the specified token.

final logParams = MessageChangeLogParams()
        ..replyType = ReplyType.none
        ..includeParentMessageInfo = true;
      final res = await channel.getMessageChangeLogs(
        token: TOKEN,
        params: logParams,
      );

List of parameters

Parameter nameTypeDescription

token

string

Specifies a token to be the reference point for the changelogs to be retrieved.

params

MessageChangeLogsParams

Contains a set of parameters you can use when retrieving changelogs.