diff options
author | Lance Stout <lancestout@gmail.com> | 2014-08-17 17:20:45 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2014-08-17 17:20:45 -0700 |
commit | 09cdbf1b76c6bf30e585a910f0f59d533c8dec21 (patch) | |
tree | d32011f02f648de9ba2d5ea99d5af1daefecbaf9 /sleekxmpp/xmlstream/stanzabase.py | |
parent | ca306e7cecee4bf7afd9ce44f5f067b305928682 (diff) | |
parent | 7265682a4d57d88956cb54f98f7a470465bbf417 (diff) | |
download | slixmpp-09cdbf1b76c6bf30e585a910f0f59d533c8dec21.tar.gz slixmpp-09cdbf1b76c6bf30e585a910f0f59d533c8dec21.tar.bz2 slixmpp-09cdbf1b76c6bf30e585a910f0f59d533c8dec21.tar.xz slixmpp-09cdbf1b76c6bf30e585a910f0f59d533c8dec21.zip |
Merge pull request #308 from Mayflower/develop
Serialize JID to allow json serializing
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r-- | sleekxmpp/xmlstream/stanzabase.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index 97107098..c6ed4163 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -565,7 +565,10 @@ class ElementBase(object): values = {} values['lang'] = self['lang'] for interface in self.interfaces: - values[interface] = self[interface] + if isinstance(self[interface], JID): + values[interface] = self[interface].jid + else: + values[interface] = self[interface] if interface in self.lang_interfaces: values['%s|*' % interface] = self['%s|*' % interface] for plugin, stanza in self.plugins.items(): |