/ SDKs / .NET
SDKs
Chat SDKs .NET v4
Chat SDKs .NET
Chat SDKs
.NET
Version 4

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. Both the GetMessageChangeLogsSinceToken() and GetMessageChangeLogsSinceTimestamp() methods require a parameter SbMessageChangeLogsParams object to determine which messages to return.

MessageChangeLogsParams

Copy link
Property nameTypeDescription

IncludeMetaArray

bool

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

IncludeReactions

bool

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

IncludeThreadInfo

bool

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

IncludeParentMessageInfo

bool

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

ReplyType

ReplyType?

Specifies the type of message to include in the results.
- None: Includes unthreaded messages and only the parent messages of threaded messages.
- All: Includes both threaded and unthreaded messages.
- OnlyReplyToChannel: 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.


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.

SbMessageChangeLogsParams changeLogsParams = new SbMessageChangeLogsParams();

channel.GetMessageChangeLogsSinceTimestamp(TIMESTAMP, changeLogsParams, (inUpdatedMessages, inDeletedMessageIds, inHasMore, inToken, inError) =>
{
    if (inError != null)
    {
        return; // Handle error.
    }
});

List of parameters

Copy link
Parameter nameTypeDescription

inParams

SbMessageChangeLogsParams

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

inTimestamp

long

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


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.

SbMessageChangeLogsParams changeLogsParams = new SbMessageChangeLogsParams();

channel.GetMessageChangeLogsSinceToken(TOKEN, changeLogsParams, (inUpdatedMessages, inDeletedMessageIds, inHasMore, inToken, inError) =>
{
    if (inError != null)
    {
        return; // Handle error.
    }
});

List of parameters

Copy link
Parameter nameTypeDescription

inParams

SbMessageChangeLogsParams

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

inToken

string

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