Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Home
/
Chat
/
JavaScript
/
Message
This is the new Docs for Chat SDK v4 for JavaScript. To see the previous Docs, click here.

List changelogs of polls

Each poll changelog has distinct properties such as the timestamp of an updated poll or the unique ID of a deleted poll. Based on these two properties, you can retrieve poll changelogs using either the timestamp or the token.


By timestamp

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

const pollChangelogs: PollChangelogs = await channel.getPollChangeLogsSinceTimestamp(ts);

List of parameters

Parameter nameTypeDescription

ts

number

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


By token

You can also retrieve poll 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.

const pollChangelogs: PollChangelogs = await channel.getPollChangeLogsSinceToken(token);

List of parameters

Parameter nameTypeDescription

token

string

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