Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-07-26 15:56:05 +0300
committerlovetox <philipp@hoerist.com>2022-07-26 15:56:05 +0300
commitc113f08ce75bfe1d068759c8bf38033d7d6ffcd3 (patch)
tree019639aafb4a31b54efa425728799bd3849bf383
parent07863d1db22037b20a0b36e3b6518cb18c686fb8 (diff)
fix: Allow handlers to connect to presence type available
-rw-r--r--nbxmpp/dispatcher.py11
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)