summaryrefslogtreecommitdiff
path: root/plugins/otr.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-08-28 20:33:28 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-08-28 20:33:28 +0100
commit95723fb6497d99ddc73a008c5ae0f4d44acdad9d (patch)
tree92200b700b605400f1c2ba54302f03f846be2c47 /plugins/otr.py
parent1a8ca9e4f8e804aca7b8a029e6b44228650ac22b (diff)
downloadpoezio-95723fb6497d99ddc73a008c5ae0f4d44acdad9d.tar.gz
poezio-95723fb6497d99ddc73a008c5ae0f4d44acdad9d.tar.bz2
poezio-95723fb6497d99ddc73a008c5ae0f4d44acdad9d.tar.xz
poezio-95723fb6497d99ddc73a008c5ae0f4d44acdad9d.zip
OTR plugin: Implement XEP-0378 (OTR Discovery)
Diffstat (limited to 'plugins/otr.py')
-rw-r--r--plugins/otr.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/otr.py b/plugins/otr.py
index 1f41cf71..cffe1797 100644
--- a/plugins/otr.py
+++ b/plugins/otr.py
@@ -493,6 +493,8 @@ class Plugin(BasePlugin):
ConversationTab.add_information_element('otr', self.display_encryption_status)
PrivateTab.add_information_element('otr', self.display_encryption_status)
+ self.core.xmpp.plugin['xep_0030'].add_feature('urn:xmpp:otr:0')
+
self.account = PoezioAccount(self.core.xmpp.boundjid.bare, OTR_DIR)
self.account.load_trusts()
self.contexts = {}
@@ -531,6 +533,8 @@ class Plugin(BasePlugin):
for context in self.contexts.values():
context.disconnect()
+ self.core.xmpp.plugin['xep_0030'].del_feature(feature='urn:xmpp:otr:0')
+
ConversationTab.remove_information_element('otr')
PrivateTab.remove_information_element('otr')