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)
This commit is contained in:
Tim Abbott 2013-06-25 13:26:42 -04:00
parent c8e34c2bfa
commit f7363af887
1 changed files with 5 additions and 5 deletions

View File

@ -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) {