mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
Move receives_*_notifications() to stream_data.js.
This moves these functions from subs.js to stream_data.js:
receives_desktop_notifications
receives_audible_notifications
This makes notifications.js no longer dependent on the
bloated subs.js.
This commit is contained in:
@@ -400,7 +400,7 @@ function should_send_desktop_notification(message) {
|
||||
// For streams, send if desktop notifications are enabled for this
|
||||
// stream.
|
||||
if ((message.type === "stream") &&
|
||||
subs.receives_desktop_notifications(message.stream)) {
|
||||
stream_data.receives_desktop_notifications(message.stream)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ function should_send_desktop_notification(message) {
|
||||
function should_send_audible_notification(message) {
|
||||
// For streams, ding if sounds are enabled for this stream.
|
||||
if ((message.type === "stream") &&
|
||||
subs.receives_audible_notifications(message.stream)) {
|
||||
stream_data.receives_audible_notifications(message.stream)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user