Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0329.py @ 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 | 025afb04c10b |
children | a201194fc461 |
comparison
equal
deleted
inserted
replaced
2519:353880a5c363 | 2520:25e16729413b |
---|---|
467 # file methods # | 467 # file methods # |
468 | 468 |
469 def _serializeData(self, files_data): | 469 def _serializeData(self, files_data): |
470 for file_data in files_data: | 470 for file_data in files_data: |
471 for key, value in file_data.iteritems(): | 471 for key, value in file_data.iteritems(): |
472 file_data[key] = unicode(value) | 472 file_data[key] = json.dumps(value) if key in ('extra',) else unicode(value) |
473 return files_data | 473 return files_data |
474 | 474 |
475 def _listFiles(self, target_jid, path, extra, profile): | 475 def _listFiles(self, target_jid, path, extra, profile): |
476 client = self.host.getClient(profile) | 476 client = self.host.getClient(profile) |
477 target_jid = client.jid.userhostJID() if not target_jid else jid.JID(target_jid) | 477 target_jid = client.jid.userhostJID() if not target_jid else jid.JID(target_jid) |