diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-09-01 22:36:56 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-09-01 22:36:56 +0200 |
commit | 91b0605bc29cbba55abbb32293c4b632608a00bf (patch) | |
tree | 1f1671e9bd475ec117e1240578cef74429ca3b33 /src/main/java/eu/siacs/conversations/crypto | |
parent | 74cf8320bcf918bf8b3511e752850e921a2f4df3 (diff) |
use same method to add message hints to otr message everywhere it is needed
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/OtrService.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/OtrService.java b/src/main/java/eu/siacs/conversations/crypto/OtrService.java index 1b296cc4e..1804704eb 100644 --- a/src/main/java/eu/siacs/conversations/crypto/OtrService.java +++ b/src/main/java/eu/siacs/conversations/crypto/OtrService.java @@ -29,6 +29,7 @@ import java.security.spec.InvalidKeySpecException; import eu.siacs.conversations.Config; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Conversation; +import eu.siacs.conversations.generator.MessageGenerator; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.xmpp.chatstate.ChatState; import eu.siacs.conversations.xmpp.jid.InvalidJidException; @@ -179,10 +180,7 @@ public class OtrService extends OtrCryptoEngineImpl implements OtrEngineHost { packet.setAttribute("to", session.getAccountID() + "/" + session.getUserID()); } packet.setBody(body); - 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"); + MessageGenerator.addMessageHints(packet); try { Jid jid = Jid.fromSessionID(session); Conversation conversation = mXmppConnectionService.find(account,jid); |