diff cagou/plugins/plugin_wid_chat.py @ 333:69d2a96ce26f

chat: serialise `options` in `fileUpload` following change in backend
author Goffi <goffi@goffi.org>
date Fri, 20 Dec 2019 12:29:37 +0100
parents 13bc00b9743a
children 36d6763af547
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.py	Fri Dec 20 12:29:37 2019 +0100
+++ b/cagou/plugins/plugin_wid_chat.py	Fri Dec 20 12:29:37 2019 +0100
@@ -30,6 +30,7 @@
 from sat.core import log as logging
 from sat.core.i18n import _
 from sat.core import exceptions
+from sat.tools.common import data_format
 from sat_frontends.quick_frontend import quick_widgets
 from sat_frontends.quick_frontend import quick_chat
 from sat_frontends.tools import jid
@@ -688,11 +689,14 @@
 
     def transferFile(self, file_path, transfer_type=C.TRANSFER_UPLOAD, cleaning_cb=None):
         if transfer_type == C.TRANSFER_UPLOAD:
+            options = {
+                "ignore_tls_errors": not G.host.tls_validation,
+            }
             G.host.bridge.fileUpload(
                 str(file_path),
                 "",
                 "",
-                {"ignore_tls_errors": C.boolConst(not G.host.tls_validation)},
+                data_format.serialise(options),
                 self.profile,
                 callback = partial(
                     G.host.actionManager,