mute users: Remove leftover check for muting bot users.

This was missed in #26005. The user popover button does not appear
for bot users. We complete the TODO here and simplify the
calculation for show_manage_menu so that we always show it if not in
spectator view and not showing the popover for self.
This commit is contained in:
Zixuan James Li 2023-06-14 20:45:40 -04:00 committed by Tim Abbott
parent 87649ddbab
commit dd3fad4b30
1 changed files with 1 additions and 5 deletions

View File

@ -234,17 +234,13 @@ function render_user_info_popover(
invisible_mode = !user_settings.presence_enabled; invisible_mode = !user_settings.presence_enabled;
} }
const muting_allowed = !is_me && !user.is_bot;
const is_active = people.is_active_user_for_popover(user.user_id); const is_active = people.is_active_user_for_popover(user.user_id);
const is_system_bot = user.is_system_bot; const is_system_bot = user.is_system_bot;
const status_text = user_status.get_status_text(user.user_id); const status_text = user_status.get_status_text(user.user_id);
const status_emoji_info = user_status.get_status_emoji(user.user_id); const status_emoji_info = user_status.get_status_emoji(user.user_id);
const spectator_view = page_params.is_spectator; const spectator_view = page_params.is_spectator;
// TODO: The show_manage_menu calculation can get a lot simpler const show_manage_menu = !spectator_view && !is_me;
// if/when we allow muting bot users.
const can_manage_user = page_params.is_admin && !is_me && !is_system_bot;
const show_manage_menu = !spectator_view && (muting_allowed || can_manage_user);
let date_joined; let date_joined;
if (spectator_view) { if (spectator_view) {