diff options
author | Lance Stout <lancestout@gmail.com> | 2012-01-05 11:33:47 -0500 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-01-05 11:33:47 -0500 |
commit | 8fd2efa2fa50751af7b5182ad7793295c540d294 (patch) | |
tree | 7639768de4d93b00e998f3575b02830b2ac97b44 /sleekxmpp/xmlstream/stanzabase.py | |
parent | 79f1aa0e1ba7dd29bf597beeae924b96950f9416 (diff) | |
parent | 6b6995bb0b80c91eda72bc92974f68133cef93a3 (diff) | |
download | slixmpp-8fd2efa2fa50751af7b5182ad7793295c540d294.tar.gz slixmpp-8fd2efa2fa50751af7b5182ad7793295c540d294.tar.bz2 slixmpp-8fd2efa2fa50751af7b5182ad7793295c540d294.tar.xz slixmpp-8fd2efa2fa50751af7b5182ad7793295c540d294.zip |
Merge branch 'develop-1.1' into develop
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r-- | sleekxmpp/xmlstream/stanzabase.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index 721181a8..d1409706 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -345,7 +345,8 @@ class ElementBase(object): """ if attrib not in self.plugins: plugin_class = self.plugin_attrib_map[attrib] - plugin = plugin_class(parent=self) + existing_xml = self.xml.find(plugin_class.tag_name()) + plugin = plugin_class(parent=self, xml=existing_xml) self.plugins[attrib] = plugin if plugin_class in self.plugin_iterables: self.iterables.append(plugin) @@ -1251,7 +1252,7 @@ class StanzaBase(ElementBase): stanza sent immediately. Useful for stream initialization. Defaults to ``False``. """ - self.stream.send_raw(self.__str__(), now=now) + self.stream.send(self, now=now) def __copy__(self): """Return a copy of the stanza object that does not share the |