editMessage

fun editMessage(channelType: String, channelId: String, message: Message): Call<Message>

Edits an existing message, uploading any new attachments through the standard AttachmentsSender / UploadAttachmentsAndroidWorker pipeline before updating the message on the server.

When the message contains new attachments (i.e. attachments with a local Attachment.upload file), the method will:

  1. Prepare attachments (mark new ones as Attachment.UploadState.Idle).

  2. Optimistically upsert the prepared message into channel state so the UI shows upload progress.

  3. Delegate upload to AttachmentsSender (which enqueues WorkManager work).

  4. On success, call updateMessage which fires the standard edit plugin hooks.

  5. On failure, revert the channel state to the original message.

If the message has no new attachments, the call delegates directly to updateMessage.

Return

Executable async Call responsible for editing the message.

Parameters

channelType

The channel type. ie messaging.

channelId

The channel id. ie 123.

message

The edited Message with resolved attachment files.