/ SDKs / iOS
SDKs
Chat SDKs iOS v4
Chat SDKs iOS
Chat SDKs
iOS
Version 4

Update a scheduled message

Copy link

You can update a scheduled user message by passing ScheduledUserMessageUpdateParams as an argument to the updateScheduledUserMessage() method.

let params = ScheduledUserMessageUpdateParams()
params.scheduledAt = SCHEDULED_AT_MILLISECONDS
params.translationTargetLanguages = TRANSLATION_TARGET_LANGUAGES
params.data = CUSTOM_DATA
params.customType = CUSTOM_TYPE
groupChannel.updateScheduledUserMessage(scheduledMessageId: SCHEDULED_MESSAGE_ID, params: params) { message, error in
    guard error == nil else {
        return // Handle error.
    }
}

You can update a scheduled file message by passing ScheduledFileMessageUpdateParams as an argument to the .updateScheduledFileMessage() method.

// Updates scheduled file message.
let params = ScheduledFileMessageUpdateParams()
params.scheduledAt = SCHEDULED_AT_MILLISECONDS
params.file = FILE_DATA
params.fileName = FILE_NAME
params.fileSize = FILE_SIZE
params.mimeType = MIME_TYPE
groupChannel.updateScheduledFileMessage(scheduledMessageId: SCHEDULED_MESSAGE_ID, params: params) { message, error in
    guard error == nil else {
        return // Handle error.
    }
}