don't include empty sessions in _chain_lengths method
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
7a887ccac3
commit
a2a287ee5d
1 changed files with 2 additions and 0 deletions
|
@ -532,6 +532,8 @@ class XEP_0384(BasePlugin):
|
||||||
lengths: ChainLengths = {'sending': [], 'receiving': []}
|
lengths: ChainLengths = {'sending': [], 'receiving': []}
|
||||||
for did in devices:
|
for did in devices:
|
||||||
session = self._omemo._SessionManager__loadSession(bare, did)
|
session = self._omemo._SessionManager__loadSession(bare, did)
|
||||||
|
if session is None:
|
||||||
|
break
|
||||||
skr = session._DoubleRatchet__skr
|
skr = session._DoubleRatchet__skr
|
||||||
lengths['sending'].append((did, skr.sending_chain_length))
|
lengths['sending'].append((did, skr.sending_chain_length))
|
||||||
lengths['receiving'].append((did, skr.receiving_chain_length))
|
lengths['receiving'].append((did, skr.receiving_chain_length))
|
||||||
|
|
Loading…
Reference in a new issue