Skip to content

Instantly share code, notes, and snippets.

@warodri-sendbird
Created October 6, 2021 07:59
Show Gist options
  • Save warodri-sendbird/4f204794dd661dbdaeed954e28223d0d to your computer and use it in GitHub Desktop.
Save warodri-sendbird/4f204794dd661dbdaeed954e28223d0d to your computer and use it in GitHub Desktop.
const params = new sb.MessageListParams();
params.prevResultSize = PREV_RESULT_SIZE;
params.nextResultSize = NEXT_RESULT_SIZE;
params.isInclusive = INCLUSIVE;
params.reverse = REVERSE;
params.includeReplies = INCLUDE_REPLIES;
params.includeThreadInfo = INCLUDE_THREAD_INFO;
params.includeParentMessageText = INCLUDE_PARENT_MESSAGE_TEXT;
...
groupChannel.getMessagesByTimestamp(TIMESTAMP, params, (messages, error) => {
if (error) {
// Handle error.
}
// A list of previous and next messages on both sides of a specified timestamp is successfully retrieved.
messages.forEach(message => {
...
});
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment