From 91a061f480565cf02252079dc769fe07277a2b71 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 14 Apr 2018 21:31:30 +0200 Subject: [PATCH] always include omemo fallback message --- .../siacs/conversations/generator/MessageGenerator.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java index 22d034ae4..833d1fb23 100644 --- a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java @@ -77,9 +77,7 @@ public class MessageGenerator extends AbstractGenerator { return null; } packet.setAxolotlMessage(axolotlMessage.toElement()); - if (Config.supportUnencrypted() && !recipientSupportsOmemo(message)) { - packet.setBody(OMEMO_FALLBACK_MESSAGE); - } + packet.setBody(OMEMO_FALLBACK_MESSAGE); packet.addChild("store", "urn:xmpp:hints"); packet.addChild("encryption","urn:xmpp:eme:0") .setAttribute("name","OMEMO") @@ -96,11 +94,6 @@ public class MessageGenerator extends AbstractGenerator { return packet; } - private static boolean recipientSupportsOmemo(Message message) { - Contact c = message.getContact(); - return c != null && c.getPresences().allOrNonSupport(AxolotlService.PEP_DEVICE_LIST_NOTIFY); - } - public static void addMessageHints(MessagePacket packet) { packet.addChild("private", "urn:xmpp:carbons:2"); packet.addChild("no-copy", "urn:xmpp:hints");