Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim

Commits:
88314abf by Philipp Hörist at 2017-03-14T20:12:49+01:00
Dont notify on own sent carbon copies

- - - - -
e1575344 by Philipp Hörist at 2017-03-14T20:27:36+01:00
Remove notifications on receiving own sent carbon copies

Notifications for a JID are removed when we see activity
in the form of a sent carbon copie from one of our other devices.

If we receive such carbon copies we can conclude that the message
we received earlier was answered from one of our other devices.

- - - - -
bdb22b9a by Philipp Hörist at 2017-03-14T20:32:03+01:00
Merge branch 'gajim_0.16' into 'gajim_0.16'

Notification improvements

See merge request !67
- - - - -


1 changed file:

- src/session.py


Changes:

=====================================
src/session.py
=====================================
--- a/src/session.py
+++ b/src/session.py
@@ -244,16 +244,21 @@ 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
+            gajim.events.remove_events(self.conn.name, fjid, types=['chat'])
         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,



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/d603a30f3a06319d5eecfb983615b50b6edde098...bdb22b9aea83123edde9c3a849f863c906180c50
_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to