diff options
author | Robin Gloster <robin@loc-com.de> | 2014-08-17 23:12:46 +0200 |
---|---|---|
committer | Robin Gloster <robin@loc-com.de> | 2014-08-17 23:13:56 +0200 |
commit | 79f3c1ac8f1aa0b099958e824dc53c17daf9849f (patch) | |
tree | 42152129b54a3a4315241d72054fb878d3649b50 /sleekxmpp/xmlstream/stanzabase.py | |
parent | a5c03b763a6545a214f4f391f7c07582c22150b2 (diff) | |
download | slixmpp-79f3c1ac8f1aa0b099958e824dc53c17daf9849f.tar.gz slixmpp-79f3c1ac8f1aa0b099958e824dc53c17daf9849f.tar.bz2 slixmpp-79f3c1ac8f1aa0b099958e824dc53c17daf9849f.tar.xz slixmpp-79f3c1ac8f1aa0b099958e824dc53c17daf9849f.zip |
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(): |