From 142f2214ea831a46d76f93ed27517c15f56eade3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Tue, 14 Mar 2017 22:17:16 +0100 Subject: [PATCH] Dont notify on own sent carbon copies --- src/session.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/session.py b/src/session.py index fe568ba75..c28817cac 100644 --- a/src/session.py +++ b/src/session.py @@ -244,16 +244,20 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession): event_type = 'single_message_received' if self.control and obj.mtype != 'normal': + # We have a ChatControl open + obj.show_in_roster = False + obj.show_in_systray = False + elif obj.forwarded and obj.sent: + # Its a Carbon Copied Message we sent obj.show_in_roster = False obj.show_in_systray = 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 (not self.control and obj.mtype != 'normal') or \ - (obj.mtype == 'normal' and not obj.popup): 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,