mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
refactor: Use sub_store for get/validation.
This reduces the complexity of our dependency graph. It also makes sub_store.get parallel to message_store.get. For both you pass in the relevant id to get the full validated object.
This commit is contained in:
@@ -33,6 +33,7 @@ import * as server_events from "./server_events";
|
||||
import * as settings_config from "./settings_config";
|
||||
import * as stream_data from "./stream_data";
|
||||
import * as stream_edit from "./stream_edit";
|
||||
import * as sub_store from "./sub_store";
|
||||
import * as subs from "./subs";
|
||||
import * as transmit from "./transmit";
|
||||
import * as ui_report from "./ui_report";
|
||||
@@ -1184,7 +1185,7 @@ export function initialize() {
|
||||
failure(error.msg);
|
||||
}
|
||||
|
||||
const sub = stream_data.get_sub_by_id(stream_id);
|
||||
const sub = sub_store.get(stream_id);
|
||||
|
||||
stream_edit.invite_user_to_stream([user_id], sub, success, xhr_failure);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user