Commit 95723fb6 authored by Link Mauve's avatar Link Mauve

OTR plugin: Implement XEP-0378 (OTR Discovery)

parent 1a8ca9e4
...@@ -75,3 +75,5 @@ Table of all XEPs implemented in poezio. ...@@ -75,3 +75,5 @@ Table of all XEPs implemented in poezio.
+----------+-------------------------+---------------------+ +----------+-------------------------+---------------------+
|0364 |Current OTR Usage |100% | |0364 |Current OTR Usage |100% |
+----------+-------------------------+---------------------+ +----------+-------------------------+---------------------+
|0378 |OTR Discovery |100% |
+----------+-------------------------+---------------------+
...@@ -493,6 +493,8 @@ class Plugin(BasePlugin): ...@@ -493,6 +493,8 @@ class Plugin(BasePlugin):
ConversationTab.add_information_element('otr', self.display_encryption_status) ConversationTab.add_information_element('otr', self.display_encryption_status)
PrivateTab.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 = PoezioAccount(self.core.xmpp.boundjid.bare, OTR_DIR)
self.account.load_trusts() self.account.load_trusts()
self.contexts = {} self.contexts = {}
...@@ -531,6 +533,8 @@ class Plugin(BasePlugin): ...@@ -531,6 +533,8 @@ class Plugin(BasePlugin):
for context in self.contexts.values(): for context in self.contexts.values():
context.disconnect() context.disconnect()
self.core.xmpp.plugin['xep_0030'].del_feature(feature='urn:xmpp:otr:0')
ConversationTab.remove_information_element('otr') ConversationTab.remove_information_element('otr')
PrivateTab.remove_information_element('otr') PrivateTab.remove_information_element('otr')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment