Daniel Brötzmann pushed to branch mainwindow at gajim / gajim


Commits:
870d5e0d by wurstsalat at 2021-10-26T22:06:28+02:00
Notifications: Allow plugins to suppress notifications

- - - - -


1 changed file:

- gajim/gtk/notification.py


Changes:

=====================================
gajim/gtk/notification.py
=====================================
@@ -121,8 +121,13 @@ def _on_notification(self, event):
         elif hasattr(event, 'sound'):
             play_sound(event.sound, event.account)
 
-        if not allow_showing_notification(event.account):
-            return
+        if hasattr(event, 'show_notification'):
+            # Allow override here, used by Triggers plugin
+            if not event.show_notification:
+                return
+        else:
+            if not allow_showing_notification(event.account):
+                return
 
         if hasattr(event, 'notif_detail'):
             notif_detail = event.notif_detail



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/870d5e0d2f4da4e292e38379bc40fcc4fe2ac11a

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/870d5e0d2f4da4e292e38379bc40fcc4fe2ac11a
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

Reply via email to