public fun performMessageAction(messageAction: MessageAction) { when (messageAction) { is ThreadReply -> { setMessageMode(MessageMode.MessageThread(messageAction.message)) } is Reply -> { messageActions.value = messageActions.value + messageAction } is Edit -> { input.value = messageAction.message.text selectedAttachments.value = messageAction.message.attachments messageActions.value = messageActions.value + messageAction } else -> { // no op, custom user action } } }
Handles selected [messageAction]. We only have three actions we can react to in the composer: