From 2e2f30334b640d977070a71df65c45c47a9e2842 Mon Sep 17 00:00:00 2001 From: RationalCoding Date: Wed, 3 Jan 2018 13:46:46 -0500 Subject: [PATCH] simplify ifs --- client/notifications/notification.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/notifications/notification.js b/client/notifications/notification.js index 3af30bf0e6f..a43e78b7cc1 100644 --- a/client/notifications/notification.js +++ b/client/notifications/notification.js @@ -44,6 +44,7 @@ Meteor.startup(function() { KonchatNotification.showDesktop(notification); } } else { + if (!hasFocus || !messageIsInOpenedRoom) { // Play a sound and show a notification. KonchatNotification.newMessage(notification.payload.rid); KonchatNotification.showDesktop(notification); @@ -67,6 +68,7 @@ Meteor.startup(function() { // Play a notification sound KonchatNotification.newMessage(notification.payload.rid); } + } else if (!hasFocus || !messageIsInOpenedRoom || !muteFocusedConversations) { // Play a notification sound KonchatNotification.newMessage(notification.payload.rid); }