frontend: Initialize user_group module before right_sidebar module.

This commit initializes the user_group module before right_sidebar
module. This was needed to check whether user is member of user_group
whose members are allowed to create invite links.
This commit is contained in:
Ujjawal Modi 2023-08-09 19:56:49 +05:30 committed by Tim Abbott
parent ec49c3acc8
commit 21b1298c1d
1 changed files with 5 additions and 1 deletions

View File

@ -656,6 +656,11 @@ export function initialize_everything() {
emoji_codes: generated_emoji_codes, emoji_codes: generated_emoji_codes,
}); });
// The user_group must be initialized before right sidebar
// module, so that we can tell whether user is member of
// user_group whose members are allowed to create multiuse invite.
user_groups.initialize(user_groups_params);
// These components must be initialized early, because other // These components must be initialized early, because other
// modules' initialization has not been audited for whether they // modules' initialization has not been audited for whether they
// expect DOM elements to always exist (As that did before these // expect DOM elements to always exist (As that did before these
@ -714,7 +719,6 @@ export function initialize_everything() {
}); });
compose_closed_ui.initialize(); compose_closed_ui.initialize();
reload.initialize(); reload.initialize();
user_groups.initialize(user_groups_params);
unread.initialize(unread_params); unread.initialize(unread_params);
bot_data.initialize(bot_params); // Must happen after people.initialize() bot_data.initialize(bot_params); // Must happen after people.initialize()
message_fetch.initialize(server_events.home_view_loaded); message_fetch.initialize(server_events.home_view_loaded);