Description: make the OMEMO plugin compliant with XEP-0380, use correct EME tag
Author: Philipp Hörist (upstream code), W. Martin Borgert (Debian patch)
Origin: upstream
Applied-Upstream: 1f78bf71
Last-Update: 2017-04-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/omemoplugin.py
+++ b/omemoplugin.py
@@ -577,11 +577,11 @@
             event.msg_iq.delChild('body')
             event.msg_iq.addChild(node=encrypted_node)
 
-            # XEP-xxxx: Explicit Message Encryption
-            if not event.msg_iq.getTag('encrypted', attrs={'xmlns': NS_EME}):
-                eme_node = Node('encrypted', attrs={'xmlns': NS_EME,
-                                                    'name': 'OMEMO',
-                                                    'namespace': NS_OMEMO})
+            # XEP-0380: Explicit Message Encryption
+            if not event.msg_iq.getTag('encryption', attrs={'xmlns': NS_EME}):
+                eme_node = Node('encryption', attrs={'xmlns': NS_EME,
+                                                     'name': 'OMEMO',
+                                                     'namespace': NS_OMEMO})
                 event.msg_iq.addChild(node=eme_node)
 
             # Add Message for devices that dont support OMEMO
@@ -687,11 +687,11 @@
 
             event.msg_iq.addChild(node=encrypted_node)
 
-            # XEP-xxxx: Explicit Message Encryption
-            if not event.msg_iq.getTag('encrypted', attrs={'xmlns': NS_EME}):
-                eme_node = Node('encrypted', attrs={'xmlns': NS_EME,
-                                                    'name': 'OMEMO',
-                                                    'namespace': NS_OMEMO})
+            # XEP-0380: Explicit Message Encryption
+            if not event.msg_iq.getTag('encryption', attrs={'xmlns': NS_EME}):
+                eme_node = Node('encryption', attrs={'xmlns': NS_EME,
+                                                     'name': 'OMEMO',
+                                                     'namespace': NS_OMEMO})
                 event.msg_iq.addChild(node=eme_node)
 
             # Store Hint for MAM
