Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Version 4
Home
/
Chat
/
JavaScript
/
Message

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 are optional to set as a filter. If not set, the number of all scheduled messages that a user has will be retrieved.

const params: TotalScheduledMessageCountParams = {
  scheduledStatus: [ScheduledStatus.PENDING],
};
const totalScheduledMessageCount: number = 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)