Skip to content

Commit

Permalink
Removed delete message option of own users messages and left it for m…
Browse files Browse the repository at this point in the history
…essage.isOutbox == true
  • Loading branch information
KshitizSareen committed Jan 18, 2023
1 parent c97c531 commit 91fd970
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/action-sheets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 91fd970

Please sign in to comment.