diff options
author | lovetox <philipp@hoerist.com> | 2022-07-26 15:56:05 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2022-07-26 15:56:05 +0300 |
commit | c113f08ce75bfe1d068759c8bf38033d7d6ffcd3 (patch) | |
tree | 019639aafb4a31b54efa425728799bd3849bf383 | |
parent | 07863d1db22037b20a0b36e3b6518cb18c686fb8 (diff) |
fix: Allow handlers to connect to presence type available
-rw-r--r-- | nbxmpp/dispatcher.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nbxmpp/dispatcher.py b/nbxmpp/dispatcher.py index b52bbb7..75678e2 100644 --- a/nbxmpp/dispatcher.py +++ b/nbxmpp/dispatcher.py @@ -421,10 +421,13 @@ class StanzaDispatcher(Observable): return typ = stanza.getType() - if name == 'message' and not typ: - typ = 'normal' - elif not typ: - typ = '' + if not typ: + if name == 'message': + typ = 'normal' + elif name == 'presence': + typ = 'available' + else: + typ = '' stanza.props = stanza.getProperties() self._log.debug('type: %s, properties: %s', typ, stanza.props) |