mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 20:47:57 +01:00
Add OMEMO to EME
This commit is contained in:
parent
5b9254aff5
commit
e200f2ddf8
2 changed files with 4 additions and 3 deletions
|
@ -42,6 +42,8 @@ public class ExplicitMessageEncryptionElement implements ExtensionElement {
|
|||
|
||||
otrV0("urn:xmpp:otr:0", "Off-the-Record Messaging (XEP-0364)"),
|
||||
|
||||
omemoVAxolotl("eu.siacs.conversations.axolotl", "OMEMO Multi End Message and Object Encryption (XEP-0384)"),
|
||||
|
||||
legacyOpenPGP("jabber:x:encrypted", "Legacy OpenPGP for XMPP [DANGEROUS, DO NOT USE!]"),
|
||||
;
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
package org.jivesoftware.smackx.omemo;
|
||||
|
||||
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.BODY_OMEMO_HINT;
|
||||
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.OMEMO;
|
||||
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.OMEMO_NAMESPACE_V_AXOLOTL;
|
||||
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.PEP_NODE_DEVICE_LIST_NOTIFY;
|
||||
|
||||
|
@ -42,7 +41,6 @@ import org.jivesoftware.smack.packet.ExtensionElement;
|
|||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.Stanza;
|
||||
import org.jivesoftware.smack.util.Async;
|
||||
|
||||
import org.jivesoftware.smackx.carbons.CarbonManager;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.eme.element.ExplicitMessageEncryptionElement;
|
||||
|
@ -474,7 +472,8 @@ public final class OmemoManager extends Manager {
|
|||
}
|
||||
|
||||
if (OmemoConfiguration.getAddEmeEncryptionHint()) {
|
||||
chatMessage.addExtension(new ExplicitMessageEncryptionElement(OMEMO_NAMESPACE_V_AXOLOTL, OMEMO));
|
||||
chatMessage.addExtension(new ExplicitMessageEncryptionElement(
|
||||
ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol.omemoVAxolotl));
|
||||
}
|
||||
|
||||
return chatMessage;
|
||||
|
|
Loading…
Reference in a new issue