Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
d64f5a91 by nicoco at 2024-02-02T08:42:41+00:00
fix: Require a space after '/me'
- - - - -
3 changed files:
- gajim/gtk/chat_list_row.py
- gajim/gtk/chat_stack.py
- gajim/gtk/conversation/message_widget.py
Changes:
=====================================
gajim/gtk/chat_list_row.py
=====================================
@@ -291,7 +291,7 @@ def set_message_text(self,
text = f'{file_type} ({file_name})'
text = GLib.markup_escape_text(text)
- if text.startswith('/me') and nickname is not None:
+ if text.startswith('/me ') and nickname is not None:
nickname = GLib.markup_escape_text(nickname)
text = text.replace('/me', f'* {nickname}', 1)
text = f'<i>{text}</i>'
=====================================
gajim/gtk/chat_stack.py
=====================================
@@ -450,7 +450,7 @@ def _issue_notification(self, event:
events.MessageReceived) -> None:
assert isinstance(
contact, BareContact | GroupchatContact | GroupchatParticipant)
if app.settings.get('notification_preview_message'):
- if text.startswith('/me'):
+ if text.startswith('/me '):
name = contact.name
if isinstance(contact, GroupchatContact):
name = event.properties.muc_nickname
=====================================
gajim/gtk/conversation/message_widget.py
=====================================
@@ -63,7 +63,7 @@ def add_with_styling(self,
if len(text) > MAX_MESSAGE_LENGTH:
text = text[:MAX_MESSAGE_LENGTH]
- if text.startswith('/me') and nickname is not None:
+ if text.startswith('/me ') and nickname is not None:
self._add_action_phrase(text, nickname)
if len(self._original_text) > MAX_MESSAGE_LENGTH:
self._add_read_more_button(self._original_text)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/d64f5a91d3dadfb2a15fa07ecf853157121ee5bf
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/d64f5a91d3dadfb2a15fa07ecf853157121ee5bf
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]