summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-10-18 12:26:17 -0700
committerLance Stout <lancestout@gmail.com>2012-10-18 12:26:17 -0700
commitd367fb938d80aa2398ac36a3ae8e8c580eb37ffc (patch)
treecf98137382a6884da1c47a8400de2b8f56398d21
parent4190027a787f878b4ea07ddd24883bb9d1a94d6e (diff)
downloadslixmpp-d367fb938d80aa2398ac36a3ae8e8c580eb37ffc.tar.gz
slixmpp-d367fb938d80aa2398ac36a3ae8e8c580eb37ffc.tar.bz2
slixmpp-d367fb938d80aa2398ac36a3ae8e8c580eb37ffc.tar.xz
slixmpp-d367fb938d80aa2398ac36a3ae8e8c580eb37ffc.zip
Recognize plugin stanzas when they're appended.
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index 08ce702a..122d7eb4 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -1217,6 +1217,10 @@ class ElementBase(object):
if item.__class__ in self.plugin_iterables:
if item.__class__.plugin_multi_attrib:
self.init_plugin(item.__class__.plugin_multi_attrib)
+ elif item.__class__ == self.plugin_tag_map.get(item.tag_name(), None):
+ self.init_plugin(item.plugin_attrib,
+ existing_xml=item.xml,
+ reuse=False)
return self
def appendxml(self, xml):