diff sat/core/sat_main.py @ 3179:84a94b385760

bridge: messageSend's extra is now serialised
author Goffi <goffi@goffi.org>
date Fri, 21 Feb 2020 12:17:38 +0100
parents d10b2368684e
children 439e2f88c3a9
line wrap: on
line diff
--- a/sat/core/sat_main.py	Tue Feb 18 18:17:18 2020 +0100
+++ b/sat/core/sat_main.py	Fri Feb 21 12:17:38 2020 +0100
@@ -783,18 +783,17 @@
 
     ## XMPP methods ##
 
-    def _messageSend(self, to_jid_s, message, subject=None, mess_type="auto", extra=None,
-                     profile_key=C.PROF_KEY_NONE,):
+    def _messageSend(
+            self, to_jid_s, message, subject=None, mess_type="auto", extra_s="",
+            profile_key=C.PROF_KEY_NONE):
         client = self.getClient(profile_key)
         to_jid = jid.JID(to_jid_s)
-        # XXX: we need to use the dictionary comprehension because D-Bus return its own
-        #      types, and pickle can't manage them. TODO: Need to find a better way
         return client.sendMessage(
             to_jid,
             message,
             subject,
             mess_type,
-            {str(key): str(value) for key, value in list(extra.items())},
+            data_format.deserialise(extra_s)
         )
 
     def _setPresence(self, to="", show="", statuses=None, profile_key=C.PROF_KEY_NONE):