diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index 8fbc658..841a46a 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -532,6 +532,8 @@ class XEP_0384(BasePlugin): lengths: ChainLengths = {'sending': [], 'receiving': []} for did in devices: session = self._omemo._SessionManager__loadSession(bare, did) + if session is None: + break skr = session._DoubleRatchet__skr lengths['sending'].append((did, skr.sending_chain_length)) lengths['receiving'].append((did, skr.receiving_chain_length))