Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
-
0b2822a5
by wurstsalat at 2023-01-13T16:31:42+01:00
1 changed file:
Changes:
| ... | ... | @@ -377,6 +377,16 @@ def _on_message_received(self, event: events.MessageReceived) -> None: |
| 377 | 377 | if not event.msgtxt or event.properties.is_sent_carbon:
|
| 378 | 378 | return
|
| 379 | 379 | |
| 380 | + client = app.get_client(event.account)
|
|
| 381 | + contact = client.get_module('Contacts').get_contact(event.jid)
|
|
| 382 | + if isinstance(contact, GroupchatContact):
|
|
| 383 | + # MUC messages may be received after some delay, so make sure we
|
|
| 384 | + # don't issue notifications for our own messages.
|
|
| 385 | + self_contact = contact.get_self()
|
|
| 386 | + if (self_contact is not None and
|
|
| 387 | + self_contact.name == event.properties.muc_nickname):
|
|
| 388 | + return
|
|
| 389 | + |
|
| 380 | 390 | if app.window.is_chat_active(event.account, event.jid):
|
| 381 | 391 | return
|
| 382 | 392 |