plugin XEP-0277: blog items data are now entirely serialised before going to bridge:

So far, and for historical reasons, blog items data where serialised using a unicode: unicode dict, which was causing trouble for many types of values (timestamps, booleans, lists).
This patch changes it by serialising the whole items before going to bridge, and deserialising it when going back. This way, complex data can be used easily in items.
This impact psEvent and serItemsData* methods which are renamed transItemsData* because there are not always serialising anymore (a new argument "serialise" allows to specify it).
When editing a blog post in jp, metadata are now more easy to manipulate, specially lists like tags.
This commit is contained in:
Goffi 2019-02-23 18:59:00 +01:00
commit 512ae0b91e

View file

@ -142,7 +142,7 @@ class MergeRequests(object):
d = self.get(client, service, node or None, max_items, item_ids, sub_id or None,
extra.rsm_request, extra.extra)
d.addCallback(lambda (tickets, metadata, parsed_patches): (
self._p.serItemsData((tickets, metadata)) +
self._p.transItemsData((tickets, metadata)) +
([[{key: unicode(value) for key, value in p.iteritems()}
for p in patches] for patches in parsed_patches],)))
return d