OTR plugin: Implement XEP-0378 (OTR Discovery)
This commit is contained in:
parent
1a8ca9e4f8
commit
95723fb649
2 changed files with 6 additions and 0 deletions
|
@ -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):
|
||||||
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):
|
||||||
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')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue