/ SDKs / JavaScript
SDKs
Chat SDKs JavaScript v4
Chat SDKs JavaScript
Chat SDKs
JavaScript
Version 4

Retrieve the total number of scheduled messages

Copy link

Use the getTotalScheduledMessageCount() method to retrieve the total number of scheduled messages a user has. The properties of TotalScheduledMessageCountParams are optional to set as a filter. If not set, the number of all scheduled messages that a user has will be retrieved.

JavaScriptTypeScript
const params = {
  scheduledStatus: [ScheduledStatus.PENDING],
};
const totalScheduledMessageCount = await sb.groupChannel.getTotalScheduledMessageCount(params);

TotalScheduledMessageCountParams

Copy link
Parameter nameTypeDescription

channelUrl?

string

Specifies the URL of the channel. (Default: null)

scheduledStatus?

list

Specifies list of ScheduledStatus where scheduled messages with only given ScheduledStatus are retrieved. (Default: null)

messageTypeFilter?

enum

Specifies the message type to filter the messages with the corresponding type. Acceptable values are ALL, USER, FILE, and ADMIN. (Default: ALL)