OTR plugin: Implement XEP-0378 (OTR Discovery)

This commit is contained in:
Emmanuel Gil Peyrot 2016-08-28 20:33:28 +01:00
parent 1a8ca9e4f8
commit 95723fb649
2 changed files with 6 additions and 0 deletions

View file

@ -75,3 +75,5 @@ Table of all XEPs implemented in poezio.
+----------+-------------------------+---------------------+
|0364 |Current OTR Usage |100% |
+----------+-------------------------+---------------------+
|0378 |OTR Discovery |100% |
+----------+-------------------------+---------------------+

View file

@ -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')