From dd3fad4b30371bead515c7968df7b03bb07afece Mon Sep 17 00:00:00 2001 From: Zixuan James Li Date: Wed, 14 Jun 2023 20:45:40 -0400 Subject: [PATCH] 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. --- web/src/popovers.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/web/src/popovers.js b/web/src/popovers.js index 0b8ccc2e6f..60ec3b238c 100644 --- a/web/src/popovers.js +++ b/web/src/popovers.js @@ -234,17 +234,13 @@ function render_user_info_popover( 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_system_bot = user.is_system_bot; const status_text = user_status.get_status_text(user.user_id); const status_emoji_info = user_status.get_status_emoji(user.user_id); const spectator_view = page_params.is_spectator; - // TODO: The show_manage_menu calculation can get a lot simpler - // 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); + const show_manage_menu = !spectator_view && !is_me; let date_joined; if (spectator_view) {