mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
refactor: Break subs dependency in stream_data.
We move remove_deactivated_user_from_all_streams into stream_events.js. There were some minor changes to rename variables and also to not rely on using `stream_info`.
This commit is contained in:
@@ -381,16 +381,6 @@ exports.add_subscriber = function (stream_name, user_id) {
|
||||
return true;
|
||||
};
|
||||
|
||||
exports.remove_deactivated_user_from_all_streams = function (user_id) {
|
||||
stream_info.values().forEach(function (stream) {
|
||||
if (exports.is_user_subscribed(stream.name, user_id)) {
|
||||
exports.remove_subscriber(stream.name, user_id);
|
||||
var sub = exports.get_sub(stream.name);
|
||||
subs.rerender_subscriptions_settings(sub);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
exports.remove_subscriber = function (stream_name, user_id) {
|
||||
var sub = exports.get_sub(stream_name);
|
||||
if (typeof sub === 'undefined') {
|
||||
|
||||
Reference in New Issue
Block a user