diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/generator/MessageGenerator.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java index 2db666076..11aa96068 100644 --- a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java @@ -64,20 +64,24 @@ public class MessageGenerator extends AbstractGenerator { return null; } packet.setAxolotlMessage(axolotlMessage.toElement()); - packet.addChild("pretty-please-store","urn:xmpp:hints"); + packet.addChild("pretty-please-store", "urn:xmpp:hints"); return packet; } + public static void addMessageHints(MessagePacket packet) { + packet.addChild("private", "urn:xmpp:carbons:2"); + packet.addChild("no-copy", "urn:xmpp:hints"); + packet.addChild("no-permanent-store", "urn:xmpp:hints"); + packet.addChild("no-permanent-storage", "urn:xmpp:hints"); //do not copy this. this is wrong. it is *store* + } + public MessagePacket generateOtrChat(Message message) { Session otrSession = message.getConversation().getOtrSession(); if (otrSession == null) { return null; } MessagePacket packet = preparePacket(message); - packet.addChild("private", "urn:xmpp:carbons:2"); - packet.addChild("no-copy", "urn:xmpp:hints"); - packet.addChild("no-permanent-store", "urn:xmpp:hints"); - packet.addChild("no-permanent-storage", "urn:xmpp:hints"); + addMessageHints(packet); try { String content; if (message.hasFileOnRemoteHost()) { |