Philipp Hörist pushed to branch retraction at gajim / gajim
Commits:
00b475b5 by Philipp Hörist at 2025-04-20T23:43:08+02:00
fix: Fix some things regarding stanza id
- - - - -
2 changed files:
- gajim/gtk/conversation/rows/message.py
- gajim/gtk/main.py
Changes:
=====================================
gajim/gtk/conversation/rows/message.py
=====================================
@@ -269,7 +269,7 @@ def get_chat_row_menu(
text=self.get_text(),
timestamp=self.timestamp,
message_id=self._original_message.id,
- stanza_id=self._original_message.stanza_id,
+ stanza_id=self.stanza_id,
pk=self.orig_pk,
corrected_pk=self.pk,
state=self.state,
@@ -408,8 +408,10 @@ def set_acknowledged(self, stanza_id: str | None) -> None:
if self._is_retracted:
return
+ if not self._original_message.corrections:
+ self.stanza_id = stanza_id
+
self.state = MessageState.ACKNOWLEDGED
- self.stanza_id = stanza_id
self._message_icons.set_message_state_icon(self.state)
def set_receipt(self, value: bool) -> None:
@@ -512,7 +514,7 @@ def can_reply(self) -> bool:
return False
if isinstance(self._contact, GroupchatContact):
- if self._original_message.stanza_id is None:
+ if self.stanza_id is None:
return False
if not self._contact.is_joined:
@@ -540,7 +542,7 @@ def can_react(self) -> bool:
if self_contact.role.is_visitor:
return False
- if self._original_message.stanza_id is None:
+ if self.stanza_id is None:
return False
if self._contact.muc_context == "public":
=====================================
gajim/gtk/main.py
=====================================
@@ -702,7 +702,11 @@ def _on_retract() -> None:
ConfirmationDialog(
_("Retract Message?"),
- _("Do you want to retract this message?"),
+ _(
+ "Do you want to retract this message?\n"
+ "Note that Gajim can not guarantee that the server or the "
+ "contacts device will remove this message."
+ ),
[
DialogButton.make("Cancel"),
DialogButton.make("Remove", text=_("_Retract"),
callback=_on_retract),
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/00b475b5fff2feccbd053c948ee344548f05d8df
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/00b475b5fff2feccbd053c948ee344548f05d8df
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]