Mercurial > libervia-backend
comparison sat_frontends/jp/cmd_file.py @ 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 | 4b842c1fb686 |
comparison
equal
deleted
inserted
replaced
4041:2594e1951cf7 | 4042:877145b4ba01 |
---|---|
371 async def on_file_action(self, action_data, action_id, security_limit, profile): | 371 async def on_file_action(self, action_data, action_id, security_limit, profile): |
372 xmlui_id = self.get_xmlui_id(action_data) | 372 xmlui_id = self.get_xmlui_id(action_data) |
373 if xmlui_id is None: | 373 if xmlui_id is None: |
374 return self.host.quit_from_signal(1) | 374 return self.host.quit_from_signal(1) |
375 try: | 375 try: |
376 from_jid = jid.JID(action_data["meta_from_jid"]) | 376 from_jid = jid.JID(action_data["from_jid"]) |
377 except KeyError: | 377 except KeyError: |
378 self.disp(_("Ignoring action without from_jid data"), 1) | 378 self.disp(_("Ignoring action without from_jid data"), 1) |
379 return | 379 return |
380 try: | 380 try: |
381 progress_id = action_data["meta_progress_id"] | 381 progress_id = action_data["progress_id"] |
382 except KeyError: | 382 except KeyError: |
383 self.disp(_("ignoring action without progress id"), 1) | 383 self.disp(_("ignoring action without progress id"), 1) |
384 return | 384 return |
385 | 385 |
386 if not self.bare_jids or from_jid.bare in self.bare_jids: | 386 if not self.bare_jids or from_jid.bare in self.bare_jids: |
400 async def on_overwrite_action(self, action_data, action_id, security_limit, profile): | 400 async def on_overwrite_action(self, action_data, action_id, security_limit, profile): |
401 xmlui_id = self.get_xmlui_id(action_data) | 401 xmlui_id = self.get_xmlui_id(action_data) |
402 if xmlui_id is None: | 402 if xmlui_id is None: |
403 return self.host.quit_from_signal(1) | 403 return self.host.quit_from_signal(1) |
404 try: | 404 try: |
405 progress_id = action_data["meta_progress_id"] | 405 progress_id = action_data["progress_id"] |
406 except KeyError: | 406 except KeyError: |
407 self.disp(_("ignoring action without progress id"), 1) | 407 self.disp(_("ignoring action without progress id"), 1) |
408 return | 408 return |
409 self.disp(_("Overwriting needed"), 1) | 409 self.disp(_("Overwriting needed"), 1) |
410 | 410 |
423 async def on_not_in_roster_action(self, action_data, action_id, security_limit, profile): | 423 async def on_not_in_roster_action(self, action_data, action_id, security_limit, profile): |
424 xmlui_id = self.get_xmlui_id(action_data) | 424 xmlui_id = self.get_xmlui_id(action_data) |
425 if xmlui_id is None: | 425 if xmlui_id is None: |
426 return self.host.quit_from_signal(1) | 426 return self.host.quit_from_signal(1) |
427 try: | 427 try: |
428 from_jid = jid.JID(action_data["meta_from_jid"]) | 428 from_jid = jid.JID(action_data["from_jid"]) |
429 except ValueError: | 429 except ValueError: |
430 self.disp( | 430 self.disp( |
431 _('invalid "from_jid" value received, ignoring: {value}').format( | 431 _('invalid "from_jid" value received, ignoring: {value}').format( |
432 value=from_jid | 432 value=from_jid |
433 ), | 433 ), |