summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-01-27 15:59:50 -0500
committerLance Stout <lancestout@gmail.com>2011-01-27 15:59:50 -0500
commit38dc35840e5653ad99ecb5c65fef464b751a32e2 (patch)
treee34df7013f4547bdcb2d5634ffe33476ea3d0885 /sleekxmpp
parent0c8a8314b2e70d4a82b1c199b7e5bc16b494e275 (diff)
downloadslixmpp-38dc35840e5653ad99ecb5c65fef464b751a32e2.tar.gz
slixmpp-38dc35840e5653ad99ecb5c65fef464b751a32e2.tar.bz2
slixmpp-38dc35840e5653ad99ecb5c65fef464b751a32e2.tar.xz
slixmpp-38dc35840e5653ad99ecb5c65fef464b751a32e2.zip
Recognize stanzas that don't use the default namespace.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 39b10a2a..1cd23fba 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -802,7 +802,8 @@ class XMLStream(object):
default_ns = self.default_ns
stanza_type = StanzaBase
for stanza_class in self.__root_stanza:
- if xml.tag == "{%s}%s" % (default_ns, stanza_class.name):
+ if xml.tag == "{%s}%s" % (default_ns, stanza_class.name) or \
+ xml.tag == stanza_class.tag_name():
stanza_type = stanza_class
break
stanza = stanza_type(self, xml)
@@ -827,7 +828,8 @@ class XMLStream(object):
# stanza type applies, a generic StanzaBase stanza will be used.
stanza_type = StanzaBase
for stanza_class in self.__root_stanza:
- if xml.tag == "{%s}%s" % (self.default_ns, stanza_class.name):
+ if xml.tag == "{%s}%s" % (self.default_ns, stanza_class.name) or \
+ xml.tag == stanza_class.tag_name():
stanza_type = stanza_class
break
stanza = stanza_type(self, xml)