Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
ff41271a by wurstsalat at 2022-10-27T23:18:52+02:00
fix: Fix quoting /me messages
Fixes #11224
- - - - -
1 changed file:
- gajim/gtk/conversation/message_widget.py
Changes:
=====================================
gajim/gtk/conversation/message_widget.py
=====================================
@@ -41,12 +41,15 @@ def __init__(self, account: str, selectable: bool = True)
-> None:
self._selectable = selectable
self._content = cast(ContentT, None)
+ self._action_phrase_text = ''
def get_content(self) -> ContentT:
return self._content
def get_text(self) -> str:
- return self._content.text
+ if self._content is not None:
+ return self._content.text
+ return self._action_phrase_text
def add_with_styling(self,
text: str,
@@ -66,6 +69,8 @@ def _add_action_phrase(self, text: str, nickname: str):
widget.show_all()
self.add(widget)
+ self._action_phrase_text = text.replace('/me', f'* {nickname}', 1)
+
def add_content(self, content: ContentT) -> None:
self.clear()
self._content = content
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/ff41271a771b16ce39ae68b7bbac56bc866f36b3
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/ff41271a771b16ce39ae68b7bbac56bc866f36b3
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits