diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index e736017..b885d8b 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -557,7 +557,7 @@ class XEP_0384(BasePlugin): receiving_chain_lengths = self._chain_lengths(jid).get('receiving', []) lengths = map(lambda d_l: d_l[1], receiving_chain_lengths) min_length = reduce(lambda x, d_l: min(x, d_l[1]), receiving_chain_lengths, 0) == -1 - return min_length or max(lengths, default=0) > self.heartbeat_after + return min_length == -1 or max(lengths, default=0) > self.heartbeat_after async def make_heartbeat(self, jid: JID) -> Message: """