@@ -53,6 +53,7 @@ import { PanelIconLucideIcon } from '../../../../buttons/PanelIconButton';
53
53
import { useShowCopyAccountIdCb } from '../../../../menuAndSettingsHooks/useCopyAccountId' ;
54
54
import { localize } from '../../../../../localization/localeTools' ;
55
55
import { sectionActions } from '../../../../../state/ducks/section' ;
56
+ import { useIsIncomingRequest } from '../../../../../hooks/useParamSelector' ;
56
57
57
58
// NOTE we override the default max-widths when in the detail isDetailView
58
59
const StyledMessageBody = styled . div `
@@ -272,6 +273,8 @@ export const OverlayMessageInfo = () => {
272
273
// is always the currently selected conversation
273
274
const convoId = useSelectedConversationKey ( ) ;
274
275
276
+ const isIncomingMessageRequest = useIsIncomingRequest ( convoId ) ;
277
+
275
278
const closePanel = useCallback ( ( ) => {
276
279
dispatch ( closeRightPanel ( ) ) ;
277
280
dispatch ( sectionActions . resetRightOverlayMode ( ) ) ;
@@ -379,7 +382,8 @@ export const OverlayMessageInfo = () => {
379
382
dataTestId = "resend-msg-from-details"
380
383
/>
381
384
) }
382
- { hasAttachments && (
385
+ { /* Saving attachments sends a data extraction message so it must be disabled for message requests. */ }
386
+ { hasAttachments && ! isIncomingMessageRequest && (
383
387
< PanelIconButton
384
388
text = { localize ( 'save' ) . toString ( ) }
385
389
iconElement = {
@@ -399,7 +403,8 @@ export const OverlayMessageInfo = () => {
399
403
} }
400
404
/>
401
405
) }
402
- { isDeletable && ! isLegacyGroup && (
406
+ { /* Deleting messages sends a "delete message" message so it must be disabled for message requests. */ }
407
+ { isDeletable && ! isLegacyGroup && ! isIncomingMessageRequest && (
403
408
< PanelIconButton
404
409
text = { localize ( 'delete' ) . toString ( ) }
405
410
iconElement = { < PanelIconLucideIcon iconUnicode = { LUCIDE_ICONS_UNICODE . TRASH2 } /> }
0 commit comments