changeset 3236:9477f3197981

plugin XEP-0384: added resetTrust in OmemoSession
author Goffi <goffi@goffi.org>
date Fri, 27 Mar 2020 09:55:16 +0100
parents c161ff21ca7c
children b0c57c9a4bd8
files sat/plugins/plugin_xep_0384.py
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0384.py	Fri Mar 27 09:53:59 2020 +0100
+++ b/sat/plugins/plugin_xep_0384.py	Fri Mar 27 09:55:16 2020 +0100
@@ -286,7 +286,7 @@
     pass
 
 
-class OmemoSession(object):
+class OmemoSession:
     """Wrapper to use omemo.OmemoSession with Deferred"""
 
     def __init__(self, session):
@@ -376,6 +376,14 @@
         )
         return promise2Deferred(setTrust_p)
 
+    def resetTrust(self, bare_jid, device):
+        bare_jid = bare_jid.userhost()
+        resetTrust_p = self._session.resetTrust(
+            bare_jid=bare_jid,
+            device=device,
+        )
+        return promise2Deferred(resetTrust_p)
+
     def getTrustForJID(self, bare_jid):
         bare_jid = bare_jid.userhost()
         get_trust_p = self._session.getTrustForJID(bare_jid=bare_jid)