From 9227c631c30a88548cf04bed3b32938ef56f71aa Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 16 Nov 2022 12:43:40 +0100 Subject: [PATCH] Fix overwriting of content type to unknown on message editing --- VERSION | 2 +- protocol/messenger_messages.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index e859362ee..ba1b494c5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.115.1 +0.115.2 diff --git a/protocol/messenger_messages.go b/protocol/messenger_messages.go index 2356c9467..72f1b7764 100644 --- a/protocol/messenger_messages.go +++ b/protocol/messenger_messages.go @@ -229,7 +229,9 @@ func (m *Messenger) applyEditMessage(editMessage *protobuf.EditMessage, message } message.Text = editMessage.Text message.EditedAt = editMessage.Clock - message.ContentType = editMessage.ContentType + if editMessage.ContentType != protobuf.ChatMessage_UNKNOWN_CONTENT_TYPE { + message.ContentType = editMessage.ContentType + } // Save original message as edit so we can retrieve history if message.EditedAt == 0 {