Remove fingerprint from get_trust_for_jid, simply wrap the omemo lib method
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
508a1fe987
commit
2b63352626
1 changed files with 3 additions and 11 deletions
|
@ -392,8 +392,8 @@ class XEP_0384(BasePlugin):
|
|||
"""
|
||||
Fetches trust for JID. The returned dictionary will contain active
|
||||
and inactive devices. Each of these dict will contain device ids
|
||||
as keys, and a dict with 'key', 'trust' and 'fingerprint' as
|
||||
values that can also be None.
|
||||
as keys, and a dict with 'key', 'trust' as values that can also be
|
||||
None.
|
||||
|
||||
Example:
|
||||
{
|
||||
|
@ -401,7 +401,6 @@ class XEP_0384(BasePlugin):
|
|||
123456: {
|
||||
'key': bytes,
|
||||
'trust': bool,
|
||||
'fingerprint': str,
|
||||
}
|
||||
}
|
||||
'inactive': {
|
||||
|
@ -410,14 +409,7 @@ class XEP_0384(BasePlugin):
|
|||
}
|
||||
"""
|
||||
|
||||
devices = self._omemo.getTrustForJID(jid.bare)
|
||||
for trust in devices['active'].values():
|
||||
if trust is not None:
|
||||
trust['fingerprint'] = fp_from_ik(trust['key'])
|
||||
for trust in devices['inactive'].values():
|
||||
if trust is not None:
|
||||
trust['fingerprint'] = fp_from_ik(trust['key'])
|
||||
return devices
|
||||
return self._omemo.getTrustForJID(jid.bare)
|
||||
|
||||
def is_encrypted(self, msg: Message) -> bool:
|
||||
return msg.xml.find('{%s}encrypted' % OMEMO_BASE_NS) is not None
|
||||
|
|
Loading…
Reference in a new issue