From 40740f50a586b2151f2d7b42db4759160ef4f3d9 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Thu, 4 Jul 2024 19:29:46 -0500 Subject: [PATCH] Always store new body+html from MUC --- .../conversations/services/XmppConnectionService.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 3d547f2e5..de6a21d61 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -4995,8 +4995,7 @@ public class XmppConnectionService extends Service { message.setServerMsgId(serverMessageId); } if (message.getEncryption() == Message.ENCRYPTION_NONE - && message.isTypeText() - && isBodyModified(message, body)) { + && message.isTypeText() && (body != null || html != null)) { message.setBody(body.content); message.setHtml(html); if (body.count > 1) { @@ -5013,13 +5012,6 @@ public class XmppConnectionService extends Service { } } - private static boolean isBodyModified(final Message message, final LocalizedContent body) { - if (body == null || body.content == null) { - return false; - } - return !body.content.equals(message.getBody()); - } - public void markMessage(Message message, int status) { markMessage(message, status, null); } -- 2.45.2