Chat / iOS
Chat iOS v4
Chat iOS
Chat
iOS
Version 4
Home
/
Chat
/
iOS
/
Message

Retrieve the total number of scheduled messages

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.
    }
}