From 91fd9705f71b8dfab4b3355f1b47192acb79ef51 Mon Sep 17 00:00:00 2001 From: KshitizSareen Date: Tue, 17 Jan 2023 18:31:44 -0800 Subject: [PATCH] Removed delete message option of own users messages and left it for message.isOutbox == true --- src/action-sheets/index.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/action-sheets/index.js b/src/action-sheets/index.js index 3684297e165..6d37b274a88 100644 --- a/src/action-sheets/index.js +++ b/src/action-sheets/index.js @@ -693,7 +693,6 @@ export const constructMessageActionButtons = (args: {| const { backgroundData, message, narrow, canStartQuoteAndReply } = args; const { ownUser, flags } = backgroundData; const buttons = []; - let deleteMessageAdded = false; if (message.isOutbox === true) { buttons.push(copyToClipboard); @@ -729,16 +728,6 @@ export const constructMessageActionButtons = (args: {| } if (message.sender_id === ownUser.user_id && messageNotDeleted(message)) { // TODO(#2793): Don't show if message isn't deletable. - buttons.push(deleteMessage); - deleteMessageAdded = true; - } - if ( - ownUser.role !== undefined - && roleIsAtLeast(ownUser.role, Role.Admin) - && messageNotDeleted(message) - && !deleteMessageAdded - ) { - buttons.push(deleteMessage); } if ( // When do we offer "Mark as unread from here"? This logic parallels