/ SDKs / Flutter
SDKs
Chat SDKs Flutter v3
Chat SDKs Flutter
Chat SDKs
Flutter
Version 3
Sendbird Chat SDK v3 for Flutter is no longer supported as a new version is released. Check out our latest Chat SDK v4

List changelogs of messages

Copy link

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

Copy link
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

Copy link

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

Copy link
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

Copy link

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

Copy link
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.