plugin XEP-0384: added resetTrust in OmemoSession
This commit is contained in:
parent
b878c3327f
commit
240c62903d
1 changed files with 9 additions and 1 deletions
|
|
@ -286,7 +286,7 @@ class SatOTPKPolicy(omemo.DefaultOTPKPolicy):
|
|||
pass
|
||||
|
||||
|
||||
class OmemoSession(object):
|
||||
class OmemoSession:
|
||||
"""Wrapper to use omemo.OmemoSession with Deferred"""
|
||||
|
||||
def __init__(self, session):
|
||||
|
|
@ -376,6 +376,14 @@ class OmemoSession(object):
|
|||
)
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue