Fix overwriting of content type to unknown on message editing

This commit is contained in:
Roman Volosovskyi 2022-11-16 12:43:40 +01:00
parent 2572321063
commit 9227c631c3
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 4 additions and 2 deletions

View File

@ -1 +1 @@
0.115.1 0.115.2

View File

@ -229,7 +229,9 @@ func (m *Messenger) applyEditMessage(editMessage *protobuf.EditMessage, message
} }
message.Text = editMessage.Text message.Text = editMessage.Text
message.EditedAt = editMessage.Clock 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 // Save original message as edit so we can retrieve history
if message.EditedAt == 0 { if message.EditedAt == 0 {