From d367fb938d80aa2398ac36a3ae8e8c580eb37ffc Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 18 Oct 2012 12:26:17 -0700 Subject: Recognize plugin stanzas when they're appended. --- sleekxmpp/xmlstream/stanzabase.py | 4 ++++ 1 file changed, 4 insertions(+) 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): -- cgit v1.2.3