Add logging in _should_heartbeat
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
a6ce12c0b3
commit
488c254523
1 changed files with 9 additions and 1 deletions
|
@ -549,8 +549,16 @@ class XEP_0384(BasePlugin):
|
|||
|
||||
length = await self._omemo().receiving_chain_length(jid.bare, device_id)
|
||||
inactive_session = (length or 0) > self.heartbeat_after
|
||||
log.debug(
|
||||
'Chain length for %r / %d: %d -> inactive_session? %r',
|
||||
jid, device_id, length, inactive_session,
|
||||
)
|
||||
log.debug('Is this a prekey message: %r', prekey)
|
||||
|
||||
return prekey or inactive_session
|
||||
res = prekey or inactive_session
|
||||
log.debug('Should heartbeat? %r', res)
|
||||
|
||||
return res
|
||||
|
||||
async def should_heartbeat(self, jid: JID, msg: Union[Message, Encrypted]) -> bool:
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue