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:
authorPhilipp Hörist <forenjunkie@chello.at>2018-08-18 13:29:48 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2018-08-18 13:29:48 +0300
commit24631042b6f200ef8134b106ac3474a36e94f1c3 (patch)
treef785ec2ecc7a3ea4b0c81feb0accc5086b7986c9
parent9ad2e79de8db68fefc5c09584b75a4888db2dbb5 (diff)
Dispatch stream header
-rw-r--r--nbxmpp/dispatcher_nb.py2
-rw-r--r--nbxmpp/simplexml.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/nbxmpp/dispatcher_nb.py b/nbxmpp/dispatcher_nb.py
index 618d8d0..105bc52 100644
--- a/nbxmpp/dispatcher_nb.py
+++ b/nbxmpp/dispatcher_nb.py
@@ -441,7 +441,7 @@ class XMPPDispatcher(PlugIn):
xmlns = 'unknown'
# features stanza has been handled before
if name not in self.handlers[xmlns]:
- if name != 'features':
+ if name not in ('features', 'stream'):
log.warning('Unknown stanza: %s', stanza)
else:
log.debug('Got %s/%s stanza' % (xmlns, name))
diff --git a/nbxmpp/simplexml.py b/nbxmpp/simplexml.py
index 4352cb9..8477b64 100644
--- a/nbxmpp/simplexml.py
+++ b/nbxmpp/simplexml.py
@@ -634,6 +634,9 @@ class NodeBuilder(object):
self._document_attrs[attr] = val
ns = self._document_nsp.get(nsp, 'http://www.gajim.org/xmlns/undeclared-root')
try:
+ header = Node(tag=tag, attrs=attrs,
+ nsp=self._document_nsp, node_built=True)
+ self.dispatch(header)
self.stream_header_received(ns, name, attrs)
except ValueError as e:
self._document_attrs = None