[polari] telepathyClient: Use normal notifications on non-GNOME desktops



commit f4a54f3467e75b962fb9a30a7dda16b06d156b38
Author: Daronion <stefanosdimos 98 gmail com>
Date:   Wed Mar 27 23:57:54 2019 +0200

    telepathyClient: Use normal notifications on non-GNOME desktops
    
    Notifications are currently only used for highlights in chat rooms,
    as we assume that GNOME's builtin chat integration will handle private
    conversation notifications. This is not available on other desktops, so
    we should notify in that case as well.
    
    https://gitlab.gnome.org/GNOME/polari/issues/18

 src/telepathyClient.js | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/telepathyClient.js b/src/telepathyClient.js
index 72646d3..9cc1267 100644
--- a/src/telepathyClient.js
+++ b/src/telepathyClient.js
@@ -663,6 +663,9 @@ class TelepathyClient extends Tp.BaseClient {
         if (!room.should_highlight_message(nick, text))
             return;
 
+        if (this._shellHandlesPrivateChats && room.type == Tp.HandleType.CONTACT)
+            return;
+
         /* Translators: This is the title of the notification announcing a newly
           received message, in the form "user-nickname in room-display-name" */
         let summary = _('%s in %s').format(nick, room.display_name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]