MUC: Set active chatstate on messages

This commit is contained in:
Philipp Hörist 2018-10-03 09:56:56 +02:00
parent ba44f98d97
commit 65f74e3d9f
1 changed files with 6 additions and 5 deletions

View File

@ -166,12 +166,13 @@ class Chatstate:
if setting == 'disabled':
return None
# Dont send chatstates to ourself
if self._con.get_own_jid().bareMatch(contact.jid):
return None
if not contact.is_groupchat():
# Dont send chatstates to ourself
if self._con.get_own_jid().bareMatch(contact.jid):
return None
if not contact.supports(nbxmpp.NS_CHATSTATES):
return None
if not contact.supports(nbxmpp.NS_CHATSTATES):
return None
self.set_active(contact.jid)
return 'active'