diff options
author | Lance Stout <lancestout@gmail.com> | 2011-01-27 15:59:50 -0500 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-01-27 15:59:50 -0500 |
commit | 38dc35840e5653ad99ecb5c65fef464b751a32e2 (patch) | |
tree | e34df7013f4547bdcb2d5634ffe33476ea3d0885 /sleekxmpp | |
parent | 0c8a8314b2e70d4a82b1c199b7e5bc16b494e275 (diff) | |
download | slixmpp-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.py | 6 |
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) |