mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
Recognize stanzas that don't use the default namespace.
This commit is contained in:
parent
0c8a8314b2
commit
38dc35840e
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue