From 7fca8e503c6aec1e276091fd7c53a78ea5ce3490 Mon Sep 17 00:00:00 2001 From: Infi Date: Tue, 28 May 2024 21:45:18 +0200 Subject: [PATCH] fix(regression/cs2): process outgoing messages Signed-off-by: Infi --- .../screens/chat/views/channel/ChannelScreenViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/chat/revolt/screens/chat/views/channel/ChannelScreenViewModel.kt b/app/src/main/java/chat/revolt/screens/chat/views/channel/ChannelScreenViewModel.kt index caaee469..339afdb5 100644 --- a/app/src/main/java/chat/revolt/screens/chat/views/channel/ChannelScreenViewModel.kt +++ b/app/src/main/java/chat/revolt/screens/chat/views/channel/ChannelScreenViewModel.kt @@ -13,6 +13,7 @@ import chat.revolt.R import chat.revolt.api.RevoltAPI import chat.revolt.api.RevoltJson import chat.revolt.api.internals.ChannelUtils +import chat.revolt.api.internals.MessageProcessor import chat.revolt.api.internals.PermissionBit import chat.revolt.api.internals.Roles import chat.revolt.api.internals.SpecialUsers @@ -285,7 +286,7 @@ class ChannelScreenViewModel @Inject constructor( // 1. they will be cleared // 2. if the user changes the content while the message is being sent we want to persist // the original content - val content = draftContent + val content = MessageProcessor.processOutgoing(draftContent, channel?.server) val replyTo = draftReplyTo.toList() // First we upload (the next 5) attachments...