From 0525731b6e27c6326b35c2eac102a38899e672d8 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 7 Feb 2025 10:14:09 +1100 Subject: [PATCH] fix: whitelist msg context actions for deprecated legacy group --- .../message-content/MessageContextMenu.tsx | 46 ++++++++++++++++--- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/ts/components/conversation/message/message-content/MessageContextMenu.tsx b/ts/components/conversation/message/message-content/MessageContextMenu.tsx index 343c757f4..a7bf98929 100644 --- a/ts/components/conversation/message/message-content/MessageContextMenu.tsx +++ b/ts/components/conversation/message/message-content/MessageContextMenu.tsx @@ -316,9 +316,41 @@ export const MessageContextMenu = (props: Props) => { return null; } + if (legacyGroupIsDeprecated) { + return ( + + + + {attachments?.length && attachments.every(m => !m.pending && m.path) ? ( + + {window.i18n('save')} + + ) : null} + {window.i18n('copy')} + { + void showMessageInfoOverlay({ messageId, dispatch }); + }} + > + + + {/* this is a message in the view, so always private */} + {sender && showCopyAccountIdAction({ isPrivate: true, pubkey: sender }) ? ( + + ) : null} + + + + ); + } + return ( - {enableReactions && !legacyGroupIsDeprecated && showEmojiPanel && ( + {enableReactions && showEmojiPanel && ( { onVisibilityChange={onVisibilityChange} animation={getMenuAnimation()} > - {enableReactions && !legacyGroupIsDeprecated && ( + {enableReactions && ( // eslint-disable-next-line @typescript-eslint/no-misused-promises { {window.i18n('save')} ) : null} {window.i18n('copy')} - {(isSent || !isOutgoing) && !legacyGroupIsDeprecated && ( + {(isSent || !isOutgoing) && ( {window.i18n('reply')} )} { {sender && showCopyAccountIdAction({ isPrivate: true, pubkey: sender }) ? ( ) : null} - {!legacyGroupIsDeprecated && } - {isDeletable && !legacyGroupIsDeprecated ? ( + + {isDeletable ? ( ) : null} - {!legacyGroupIsDeprecated && } - {!legacyGroupIsDeprecated && } + +