/ SDKs / iOS
Chat SDKs iOS v4
Chat SDKs iOS
Chat SDKs
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.

// Retrieves the total number of scheduled messages.
let params = TotalScheduledMessageCountParams(channelURL: CHANNEL_URL)
params.messageTypeFilter = MESSAGE_TYPE_FILTER
params.scheduledStatusOptions = SCHEDULED_STATUS_OPTIONS
SendbirdChat.getTotalScheduledMessageCount(params: params) { count, error in
    guard error == nil else {
        return // Handle error.