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

Update a scheduled message

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