From e0e8f8f4443de0a0875c0697dd30f0ddcb783d72 Mon Sep 17 00:00:00 2001 From: Ian Macdonald Date: Thu, 5 May 2022 12:59:29 +0200 Subject: [PATCH] Fix unfilled variable when user deletes messages only for himself. --- ts/interactions/conversations/unsendingInteractions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/interactions/conversations/unsendingInteractions.ts b/ts/interactions/conversations/unsendingInteractions.ts index 064bfba95..a1f09a5d5 100644 --- a/ts/interactions/conversations/unsendingInteractions.ts +++ b/ts/interactions/conversations/unsendingInteractions.ts @@ -365,13 +365,14 @@ export async function deleteMessagesById(messageIds: Array, conversation await Promise.all(messageIds.map(m => getMessageById(m, false))) ); + const messageCount = selectedMessages.length; const moreThanOne = selectedMessages.length > 1; window.inboxStore?.dispatch( updateConfirmModal({ title: window.i18n('deleteJustForMe'), message: moreThanOne - ? window.i18n('deleteMessagesQuestion') + ? window.i18n('deleteMessagesQuestion', [messageCount.toString()]) : window.i18n('deleteMessageQuestion'), okText: window.i18n('delete'), okTheme: SessionButtonColor.Danger,