From 9b866fd1a05ddd37d70aecda9c605d20403afe92 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 13 Aug 2017 23:03:11 +0200 Subject: [PATCH] do not create Event when we auto popup a normal message. Fixes #8645 --- gajim/session.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gajim/session.py b/gajim/session.py index eaff1ab04..a62bbd2f0 100644 --- a/gajim/session.py +++ b/gajim/session.py @@ -242,18 +242,24 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession): # We have a ChatControl open obj.show_in_roster = False obj.show_in_systray = False + do_event = False elif obj.forwarded and obj.sent: # Its a Carbon Copied Message we sent obj.show_in_roster = False obj.show_in_systray = False gajim.events.remove_events(self.conn.name, fjid, types=['chat']) + do_event = False else: # Everything else obj.show_in_roster = notify.get_show_in_roster(event_type, self.conn.name, contact, self) obj.show_in_systray = notify.get_show_in_systray(event_type, self.conn.name, contact) - + if obj.mtype == 'normal' and not obj.popup: + do_event = False + else: + do_event = True + if do_event: event = event_t(obj.msgtxt, obj.subject, obj.mtype, obj.timestamp, obj.encrypted, obj.resource, obj.msg_log_id, correct_id=(obj.id_, obj.correct_id), xhtml=obj.xhtml,