changeset 4042:877145b4ba01

core: don't use `meta_` prefix anymore for `action_extra` in `action_new` signal.
author Goffi <goffi@goffi.org>
date Mon, 15 May 2023 16:20:50 +0200
parents 2594e1951cf7
children 9641ce286e07
files sat/plugins/plugin_exp_jingle_stream.py sat/plugins/plugin_misc_file.py sat/plugins/plugin_xep_0353.py sat_frontends/jp/base.py sat_frontends/jp/cmd_file.py sat_frontends/jp/cmd_pipe.py
diffstat 6 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_exp_jingle_stream.py	Mon May 15 16:20:45 2023 +0200
+++ b/sat/plugins/plugin_exp_jingle_stream.py	Mon May 15 16:20:50 2023 +0200
@@ -255,8 +255,8 @@
             _(CONFIRM_TITLE),
             type_=C.XMLUI_DIALOG_CONFIRM,
             action_extra={
-                "meta_from_jid": session["peer_jid"].full(),
-                "meta_type": "STREAM",
+                "from_jid": session["peer_jid"].full(),
+                "type": "STREAM",
             },
             security_limit=SECURITY_LIMIT,
             profile=client.profile,
--- a/sat/plugins/plugin_misc_file.py	Mon May 15 16:20:45 2023 +0200
+++ b/sat/plugins/plugin_misc_file.py	Mon May 15 16:20:50 2023 +0200
@@ -271,9 +271,9 @@
                 _(CONFIRM_OVERWRITE).format(file_path),
                 _(CONFIRM_OVERWRITE_TITLE),
                 action_extra={
-                    "meta_from_jid": peer_jid.full(),
-                    "meta_type": C.META_TYPE_OVERWRITE,
-                    "meta_progress_id": file_data[PROGRESS_ID_KEY],
+                    "from_jid": peer_jid.full(),
+                    "type": C.META_TYPE_OVERWRITE,
+                    "progress_id": file_data[PROGRESS_ID_KEY],
                 },
                 security_limit=SECURITY_LIMIT,
                 profile=client.profile,
@@ -331,9 +331,9 @@
             type_=C.XMLUI_DIALOG_FILE,
             options={C.XMLUI_DATA_FILETYPE: C.XMLUI_DATA_FILETYPE_DIR},
             action_extra={
-                "meta_from_jid": peer_jid.full(),
-                "meta_type": C.META_TYPE_FILE,
-                "meta_progress_id": file_data[PROGRESS_ID_KEY],
+                "from_jid": peer_jid.full(),
+                "type": C.META_TYPE_FILE,
+                "progress_id": file_data[PROGRESS_ID_KEY],
             },
             security_limit=SECURITY_LIMIT,
             profile=client.profile,
--- a/sat/plugins/plugin_xep_0353.py	Mon May 15 16:20:45 2023 +0200
+++ b/sat/plugins/plugin_xep_0353.py	Mon May 15 16:20:50 2023 +0200
@@ -179,9 +179,9 @@
             accept = await xml_tools.defer_confirm(
                 self.host, confirm_msg, confirm_title, profile=client.profile,
                 action_extra={
-                    "meta_type": C.META_TYPE_NOT_IN_ROSTER_LEAK,
-                    "meta_session_id": session_id,
-                    "meta_from_jid": peer_jid.full(),
+                    "type": C.META_TYPE_NOT_IN_ROSTER_LEAK,
+                    "session_id": session_id,
+                    "from_jid": peer_jid.full(),
                 }
             )
             if not accept:
--- a/sat_frontends/jp/base.py	Mon May 15 16:20:45 2023 +0200
+++ b/sat_frontends/jp/base.py	Mon May 15 16:20:50 2023 +0200
@@ -1398,7 +1398,7 @@
             return
         action_data = data_format.deserialise(action_data_s)
         try:
-            action_type = action_data['meta_type']
+            action_type = action_data['type']
         except KeyError:
             try:
                 xml_ui = action_data["xmlui"]
--- a/sat_frontends/jp/cmd_file.py	Mon May 15 16:20:45 2023 +0200
+++ b/sat_frontends/jp/cmd_file.py	Mon May 15 16:20:50 2023 +0200
@@ -373,12 +373,12 @@
         if xmlui_id is None:
             return self.host.quit_from_signal(1)
         try:
-            from_jid = jid.JID(action_data["meta_from_jid"])
+            from_jid = jid.JID(action_data["from_jid"])
         except KeyError:
             self.disp(_("Ignoring action without from_jid data"), 1)
             return
         try:
-            progress_id = action_data["meta_progress_id"]
+            progress_id = action_data["progress_id"]
         except KeyError:
             self.disp(_("ignoring action without progress id"), 1)
             return
@@ -402,7 +402,7 @@
         if xmlui_id is None:
             return self.host.quit_from_signal(1)
         try:
-            progress_id = action_data["meta_progress_id"]
+            progress_id = action_data["progress_id"]
         except KeyError:
             self.disp(_("ignoring action without progress id"), 1)
             return
@@ -425,7 +425,7 @@
         if xmlui_id is None:
             return self.host.quit_from_signal(1)
         try:
-            from_jid = jid.JID(action_data["meta_from_jid"])
+            from_jid = jid.JID(action_data["from_jid"])
         except ValueError:
             self.disp(
                 _('invalid "from_jid" value received, ignoring: {value}').format(
--- a/sat_frontends/jp/cmd_pipe.py	Mon May 15 16:20:45 2023 +0200
+++ b/sat_frontends/jp/cmd_pipe.py	Mon May 15 16:20:50 2023 +0200
@@ -123,7 +123,7 @@
         if xmlui_id is None:
             self.host.quit_from_signal(C.EXIT_ERROR)
         try:
-            from_jid = jid.JID(action_data["meta_from_jid"])
+            from_jid = jid.JID(action_data["from_jid"])
         except KeyError:
             self.disp(_("Ignoring action without from_jid data"), error=True)
             return