fix: block msg request confirmation dialog copy

pull/3206/head
Audric Ackermann 1 year ago
parent a854bfbbe5
commit 5d5dba703d
No known key found for this signature in database

@ -156,12 +156,17 @@ export const declineConversationWithConfirm = ({
syncToDevices: boolean; syncToDevices: boolean;
blockContact: boolean; // if set to false, the contact will just be set to not approved 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( window?.inboxStore?.dispatch(
updateConfirmModal({ updateConfirmModal({
okText: blockContact ? window.i18n('block') : window.i18n('delete'), okText: blockContact ? window.i18n('block') : window.i18n('delete'),
cancelText: window.i18n('cancel'), cancelText: window.i18n('cancel'),
title: window.i18n('delete'), title: blockContact ? window.i18n('block') : window.i18n('delete'),
i18nMessage: { token: 'messageRequestsDelete' }, i18nMessage: blockContact
? { token: 'blockDescription', args: { name: convoName } }
: { token: 'messageRequestsDelete' },
onClickOk: async () => { onClickOk: async () => {
await declineConversationWithoutConfirm({ await declineConversationWithoutConfirm({
conversationId, conversationId,

Loading…
Cancel
Save