From f7363af887e671a1bda605abc91ef89878bb12c0 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 25 Jun 2013 13:26:42 -0400 Subject: [PATCH] Don't send desktop notifications for messages you sent to a stream. Previously, we were only checking whether the message was sent by you for PMs, not for streams that you marked as notifiable. (imported from commit 668e102e885aa347cceff376c1873c1c62aff997) --- zephyr/static/js/notifications.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zephyr/static/js/notifications.js b/zephyr/static/js/notifications.js index be0473a7c4..7b2a6703e1 100644 --- a/zephyr/static/js/notifications.js +++ b/zephyr/static/js/notifications.js @@ -207,11 +207,11 @@ exports.speaking_at_me = function (message) { function message_is_notifiable(message) { // based purely on message contents, can we notify the user about the message? - return ((message.type === "private" && - !message.sent_by_me) || - exports.speaking_at_me(message) || - (message.type === "stream" && - subs.receives_notifications(message.stream))); + return (!message.sent_by_me && + (message.type === "private" || + exports.speaking_at_me(message) || + (message.type === "stream" && + subs.receives_notifications(message.stream)))); } exports.received_messages = function (messages) {