diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index 0ecb0d2..3c2f689 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -643,7 +643,7 @@ class XEP_0384(BasePlugin): finally: asyncio.ensure_future(self._publish_bundle()) - if self.auto_heartbeat: + if self.auto_heartbeat and self.should_heartbeat(): msg = self.make_heartbeat(jid) msg.send()