# HG changeset patch # User Goffi # Date 1600332373 -7200 # Node ID 569f4cf7183b9ba9fa7241e10ddface404995c98 # Parent 33d9b38b58905db066fea34f6d363fbf0344afde plugin XEP-0313: fixed `MAMGet` signature diff -r 33d9b38b5890 -r 569f4cf7183b sat/plugins/plugin_xep_0313.py --- a/sat/plugins/plugin_xep_0313.py Mon Sep 14 09:23:23 2020 +0200 +++ b/sat/plugins/plugin_xep_0313.py Thu Sep 17 10:46:13 2020 +0200 @@ -69,7 +69,7 @@ self._last_stanza_id_d.callback(None) host.bridge.addMethod( "MAMGet", ".plugin", in_sign='sss', - out_sign='(a(sdssa{ss}a{ss}sa{ss})a{ss}s)', method=self._getArchives, + out_sign='(a(sdssa{ss}a{ss}ss)ss)', method=self._getArchives, async_=True) @defer.inlineCallbacks @@ -331,7 +331,7 @@ 'rsm': self._rsm.response2dict(rsm_response), 'mam': mam_response } - return mess_list, metadata, client.profile + return mess_list, data_format.serialise(metadata), client.profile def _getArchives(self, service, extra_ser, profile_key): """ diff -r 33d9b38b5890 -r 569f4cf7183b sat_frontends/jp/cmd_message.py --- a/sat_frontends/jp/cmd_message.py Mon Sep 14 09:23:23 2020 +0200 +++ b/sat_frontends/jp/cmd_message.py Thu Sep 17 10:46:13 2020 +0200 @@ -236,12 +236,14 @@ if value is not None: extra[key] = str(value) try: - data, metadata, profile = await self.host.bridge.MAMGet( + data, metadata_s, profile = await self.host.bridge.MAMGet( self.args.service, data_format.serialise(extra), self.profile) except Exception as e: self.disp(f"can't retrieve MAM archives: {e}", error=True) self.host.quit(C.EXIT_BRIDGE_ERRBACK) + metadata = data_format.deserialise(metadata_s) + try: session_info = await self.host.bridge.sessionInfosGet(self.profile) except Exception as e: