Add catch-all chatstate event.

This commit is contained in:
Lance Stout 2012-08-24 11:47:21 -07:00
parent e68b07dbce
commit c7ec6a72cd

View file

@ -52,4 +52,5 @@ class XEP_0085(BasePlugin):
def _handle_chat_state(self, msg): def _handle_chat_state(self, msg):
state = msg['chat_state'] state = msg['chat_state']
log.debug("Chat State: %s, %s", state, msg['from'].jid) log.debug("Chat State: %s, %s", state, msg['from'].jid)
self.xmpp.event('chatstate', msg)
self.xmpp.event('chatstate_%s' % state, msg) self.xmpp.event('chatstate_%s' % state, msg)