Add 'presence' event, raised for all incoming presence stanzas.

This commit is contained in:
Lance Stout 2012-06-06 16:10:25 -07:00
parent 3b2c865a58
commit f5652a667b

View file

@ -737,7 +737,8 @@ class BaseXMPP(XMLStream):
if not self.is_component and not presence['to'].bare:
presence['to'] = self.boundjid
self.event("presence_%s" % presence['type'], presence)
self.event('presence', presence)
self.event('presence_%s' % presence['type'], presence)
# Check for changes in subscription state.
if presence['type'] in ('subscribe', 'subscribed',