Mercurial > libervia-backend
comparison sat/plugins/plugin_misc_merge_requests.py @ 2910:b2f323237fce
jp, plugin merge-requests: used u'' as default for item id in pubsub arguments + fixed some required arguments:
u"" is now used as defaut item id instead of node, as it needs to be serialised anyway. This is temporary solution, as empty string can be used for item id (not forbidden by XEP-0060), but for now this is not handled correctly in jp/SàT (see https://bugs.goffi.org/bugs/view/289). Correct solution will probably need to use a special key in extra to mark empty string in id.
Added/removed some required values for node or item when it made sense.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 14 Apr 2019 08:21:51 +0200 |
parents | 0b7ce5daee9b |
children | 989b622faff6 |
comparison
equal
deleted
inserted
replaced
2909:90146552cde5 | 2910:b2f323237fce |
---|---|
192 | 192 |
193 def _set(self, service, node, repository, method, values, schema=None, item_id=None, | 193 def _set(self, service, node, repository, method, values, schema=None, item_id=None, |
194 extra=None, profile_key=C.PROF_KEY_NONE): | 194 extra=None, profile_key=C.PROF_KEY_NONE): |
195 client, service, node, schema, item_id, extra = self._s.prepareBridgeSet( | 195 client, service, node, schema, item_id, extra = self._s.prepareBridgeSet( |
196 service, node, schema, item_id, extra, profile_key) | 196 service, node, schema, item_id, extra, profile_key) |
197 d = self.set(client, service, node, repository, method, values, schema, item_id, | 197 d = self.set(client, service, node, repository, method, values, schema, |
198 extra, deserialise=True) | 198 item_id or None, extra, deserialise=True) |
199 d.addCallback(lambda ret: ret or u'') | 199 d.addCallback(lambda ret: ret or u'') |
200 return d | 200 return d |
201 | 201 |
202 @defer.inlineCallbacks | 202 @defer.inlineCallbacks |
203 def set(self, client, service, node, repository, method=u'auto', values=None, | 203 def set(self, client, service, node, repository, method=u'auto', values=None, |