Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
0b2822a5 by wurstsalat at 2023-01-13T16:31:42+01:00
fix: Notifications: Fix rare case where Gajim displays notifications for our
own messages
Fixes #11305
- - - - -
1 changed file:
- gajim/gtk/chat_stack.py
Changes:
=====================================
gajim/gtk/chat_stack.py
=====================================
@@ -377,6 +377,16 @@ def _on_message_received(self, event:
events.MessageReceived) -> None:
if not event.msgtxt or event.properties.is_sent_carbon:
return
+ client = app.get_client(event.account)
+ contact = client.get_module('Contacts').get_contact(event.jid)
+ if isinstance(contact, GroupchatContact):
+ # MUC messages may be received after some delay, so make sure we
+ # don't issue notifications for our own messages.
+ self_contact = contact.get_self()
+ if (self_contact is not None and
+ self_contact.name == event.properties.muc_nickname):
+ return
+
if app.window.is_chat_active(event.account, event.jid):
return
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/0b2822a51428f2cfc581764772f519cc69542889
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/0b2822a51428f2cfc581764772f519cc69542889
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