changeset 2520:25e16729413b

plugin XEP-0329: fixed extra key serialisation before sending to bridge
author Goffi <goffi@goffi.org>
date Wed, 14 Mar 2018 08:10:31 +0100
parents 353880a5c363
children 327bbbe793ce
files src/plugins/plugin_xep_0329.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0329.py	Wed Mar 14 08:08:42 2018 +0100
+++ b/src/plugins/plugin_xep_0329.py	Wed Mar 14 08:10:31 2018 +0100
@@ -469,7 +469,7 @@
     def _serializeData(self, files_data):
         for file_data in files_data:
             for key, value in file_data.iteritems():
-                file_data[key] = unicode(value)
+                file_data[key] = json.dumps(value) if key in ('extra',) else unicode(value)
         return files_data
 
     def _listFiles(self, target_jid, path, extra, profile):