mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +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:
@@ -193,6 +193,22 @@ exports.create_sub_from_server_data = function (stream_name, attrs) {
|
||||
return sub;
|
||||
};
|
||||
|
||||
exports.receives_desktop_notifications = function (stream_name) {
|
||||
var sub = exports.get_sub(stream_name);
|
||||
if (sub === undefined) {
|
||||
return false;
|
||||
}
|
||||
return sub.desktop_notifications;
|
||||
};
|
||||
|
||||
exports.receives_audible_notifications = function (stream_name) {
|
||||
var sub = exports.get_sub(stream_name);
|
||||
if (sub === undefined) {
|
||||
return false;
|
||||
}
|
||||
return sub.audible_notifications;
|
||||
};
|
||||
|
||||
return exports;
|
||||
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user