mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
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:
@@ -207,11 +207,11 @@ exports.speaking_at_me = function (message) {
|
|||||||
|
|
||||||
function message_is_notifiable(message) {
|
function message_is_notifiable(message) {
|
||||||
// based purely on message contents, can we notify the user about the message?
|
// based purely on message contents, can we notify the user about the message?
|
||||||
return ((message.type === "private" &&
|
return (!message.sent_by_me &&
|
||||||
!message.sent_by_me) ||
|
(message.type === "private" ||
|
||||||
exports.speaking_at_me(message) ||
|
exports.speaking_at_me(message) ||
|
||||||
(message.type === "stream" &&
|
(message.type === "stream" &&
|
||||||
subs.receives_notifications(message.stream)));
|
subs.receives_notifications(message.stream))));
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.received_messages = function (messages) {
|
exports.received_messages = function (messages) {
|
||||||
|
|||||||
Reference in New Issue
Block a user