From 83a9401a89b0240831591657520d7e7bb7d211ce Mon Sep 17 00:00:00 2001 From: Sahil Batra Date: Wed, 24 Nov 2021 13:09:21 +0530 Subject: [PATCH] settings_data: Remove redundant check from user_can_edit_topic_of_any_message. We already check the everyone case in user_has_permission so there is no need to check it in user_can_edit_topic_of_any_message. --- static/js/settings_data.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/static/js/settings_data.ts b/static/js/settings_data.ts index 3b82611350..970e1d0b4f 100644 --- a/static/js/settings_data.ts +++ b/static/js/settings_data.ts @@ -223,12 +223,6 @@ export function user_can_add_custom_emoji(): boolean { } export function user_can_edit_topic_of_any_message(): boolean { - if ( - page_params.realm_edit_topic_policy === - settings_config.common_message_policy_values.by_everyone.code - ) { - return true; - } return user_has_permission(page_params.realm_edit_topic_policy); }