diff sat/plugins/plugin_xep_0277.py @ 3586:5f65f4e9f8cb

plugin XEP-0060: getItems extra is now serialised dict
author Goffi <goffi@goffi.org>
date Wed, 28 Jul 2021 23:01:15 +0200
parents edc79cefe968
children d830c11eeef3
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0277.py	Wed Jul 28 22:15:31 2021 +0200
+++ b/sat/plugins/plugin_xep_0277.py	Wed Jul 28 23:01:15 2021 +0200
@@ -118,7 +118,7 @@
         host.bridge.addMethod(
             "mbGet",
             ".plugin",
-            in_sign="ssiasa{ss}s",
+            in_sign="ssiasss",
             out_sign="s",
             method=self._mbGet,
             async_=True,
@@ -931,7 +931,7 @@
         metadata['items'] = items
         return data_format.serialise(metadata)
 
-    def _mbGet(self, service="", node="", max_items=10, item_ids=None, extra_dict=None,
+    def _mbGet(self, service="", node="", max_items=10, item_ids=None, extra="",
                profile_key=C.PROF_KEY_NONE):
         """
         @param max_items(int): maximum number of item to get, C.NO_LIMIT for no limit
@@ -940,7 +940,7 @@
         client = self.host.getClient(profile_key)
         service = jid.JID(service) if service else None
         max_items = None if max_items == C.NO_LIMIT else max_items
-        extra = self._p.parseExtra(extra_dict)
+        extra = self._p.parseExtra(data_format.deserialise(extra))
         d = defer.ensureDeferred(
             self.mbGet(client, service, node or None, max_items, item_ids,
                        extra.rsm_request, extra.extra)