From 5d5dba703d6c61be3a83843353eace13b63fe27b Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 6 Sep 2024 11:30:26 +1000 Subject: [PATCH] fix: block msg request confirmation dialog copy --- ts/interactions/conversationInteractions.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ts/interactions/conversationInteractions.ts b/ts/interactions/conversationInteractions.ts index 99e9bcb54..5f0265292 100644 --- a/ts/interactions/conversationInteractions.ts +++ b/ts/interactions/conversationInteractions.ts @@ -156,12 +156,17 @@ export const declineConversationWithConfirm = ({ syncToDevices: boolean; blockContact: boolean; // if set to false, the contact will just be set to not approved }) => { + const convoName = + getConversationController().get(conversationId)?.getNicknameOrRealUsernameOrPlaceholder() || + window.i18n('unknown'); window?.inboxStore?.dispatch( updateConfirmModal({ okText: blockContact ? window.i18n('block') : window.i18n('delete'), cancelText: window.i18n('cancel'), - title: window.i18n('delete'), - i18nMessage: { token: 'messageRequestsDelete' }, + title: blockContact ? window.i18n('block') : window.i18n('delete'), + i18nMessage: blockContact + ? { token: 'blockDescription', args: { name: convoName } } + : { token: 'messageRequestsDelete' }, onClickOk: async () => { await declineConversationWithoutConfirm({ conversationId,