~singpolyma/cheogram-android

40740f50a586b2151f2d7b42db4759160ef4f3d9 — Stephen Paul Weber 2 months ago 74d09d4
Always store new body+html from MUC
1 files changed, 1 insertions(+), 9 deletions(-)

M src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
M src/main/java/eu/siacs/conversations/services/XmppConnectionService.java => src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +1 -9
@@ 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);
    }