Add docstring for get_trust_for_jid

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <>
parent 179db446
......@@ -387,7 +387,28 @@ class XEP_0384(BasePlugin):
def distrust(self, jid: JID, device_id: int, ik: bytes) -> None:
self._omemo.distrust(jid.bare, device_id, ik)
def get_trust_for_jid(self, jid: JID) -> Dict[str, List[Optional[Tuple[bytes, bool, str]]]]:
def get_trust_for_jid(self, jid: JID) -> Dict[str, List[Optional[Dict[str, Any]]]]:
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.
'active': {
123456: {
'key': bytes,
'trust': bool,
'fingerprint': str,
'inactive': {
234567: None,
devices = self._omemo.getTrustForJID(jid.bare)
for trust in devices['active'].values():
if trust is not None:
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