Merge pull request #3023 from yougotwill/fix/ses-1434/note_to_self_delete

SES-1434 fix: note to self convos cannot delete for everyone
pull/3028/head
Audric Ackermann 1 year ago committed by GitHub
commit 71d592e394
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -376,6 +376,8 @@ export async function deleteMessagesById(messageIds: Array<string>, conversation
await Promise.all(messageIds.map(m => Data.getMessageById(m, false)))
);
const isMe = conversation.isMe();
const messageCount = selectedMessages.length;
const moreThanOne = selectedMessages.length > 1;
const closeDialog = () => window.inboxStore?.dispatch(updateConfirmModal(null));
@ -386,10 +388,12 @@ export async function deleteMessagesById(messageIds: Array<string>, conversation
message: moreThanOne
? window.i18n('deleteMessagesQuestion', [messageCount.toString()])
: window.i18n('deleteMessageQuestion'),
radioOptions: [
{ label: window.i18n('deleteJustForMe'), value: 'deleteJustForMe' },
{ label: window.i18n('deleteForEveryone'), value: 'deleteForEveryone' },
],
radioOptions: !isMe
? [
{ label: window.i18n('deleteJustForMe'), value: 'deleteJustForMe' },
{ label: window.i18n('deleteForEveryone'), value: 'deleteForEveryone' },
]
: undefined,
okText: window.i18n('delete'),
okTheme: SessionButtonColor.Danger,
onClickOk: async args => {

Loading…
Cancel
Save