Chatstates: Add more log output

This commit is contained in:
Philipp Hörist 2019-01-06 11:23:30 +01:00
parent 6a958c5725
commit 5776d3de48
1 changed files with 3 additions and 0 deletions

View File

@ -301,12 +301,15 @@ class Chatstate:
# which are not allowed to see our status
if not contact.is_pm_contact:
if contact and contact.sub in ('to', 'none'):
log.info('Contact not subscribed: %s', contact.jid)
return
if contact.show == 'offline':
log.info('Contact offline: %s', contact.jid)
return
if not contact.supports(nbxmpp.NS_CHATSTATES):
log.info('Chatstates not supported: %s', contact.jid)
return
if state in (State.ACTIVE, State.COMPOSING):