diff --git a/lib/shared/reaction-utils.js b/lib/shared/reaction-utils.js --- a/lib/shared/reaction-utils.js +++ b/lib/shared/reaction-utils.js @@ -18,7 +18,6 @@ } from '../types/message-types.js'; import type { ThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js'; import { threadPermissions } from '../types/thread-permission-types.js'; -import { threadTypeIsThick } from '../types/thread-types-enum.js'; import { useDispatchActionPromise } from '../utils/redux-promise-utils.js'; import { useSelector } from '../utils/redux-utils.js'; @@ -98,7 +97,8 @@ if ( !targetMessageInfo || - (!targetMessageInfo.id && !threadTypeIsThick(threadInfo.type)) || + (!targetMessageInfo.id && + !threadSpecs[threadInfo.type].protocol.canActionsTargetPendingMessages) || (threadInfo.sourceMessageID && threadInfo.sourceMessageID === targetMessageInfo.id) ) { diff --git a/lib/shared/sidebar-utils.js b/lib/shared/sidebar-utils.js --- a/lib/shared/sidebar-utils.js +++ b/lib/shared/sidebar-utils.js @@ -12,7 +12,7 @@ useThreadHasPermission, userIsMember, } from './thread-utils.js'; -import { threadTypeIsPersonal } from './threads/thread-specs.js'; +import { threadSpecs, threadTypeIsPersonal } from './threads/thread-specs.js'; import type { ChatMessageInfoItem } from '../selectors/chat-selectors.js'; import { chatMessageItemEngagementTargetMessageInfo } from '../shared/chat-message-item-utils.js'; import { messageTypes } from '../types/message-types-enum.js'; @@ -214,7 +214,8 @@ if ( !messageInfo || - (!messageInfo.id && !threadTypeIsThick(threadInfo.type)) || + (!messageInfo.id && + !threadSpecs[threadInfo.type].protocol.canActionsTargetPendingMessages) || (threadInfo.sourceMessageID && threadInfo.sourceMessageID === messageInfo.id) || isInvalidSidebarSource(messageInfo) diff --git a/lib/shared/threads/protocols/dm-thread-protocol.js b/lib/shared/threads/protocols/dm-thread-protocol.js --- a/lib/shared/threads/protocols/dm-thread-protocol.js +++ b/lib/shared/threads/protocols/dm-thread-protocol.js @@ -482,6 +482,8 @@ }, uploadMultimediaMetadataToKeyserver: false, + + canActionsTargetPendingMessages: true, }); export { dmThreadProtocol }; diff --git a/lib/shared/threads/protocols/keyserver-thread-protocol.js b/lib/shared/threads/protocols/keyserver-thread-protocol.js --- a/lib/shared/threads/protocols/keyserver-thread-protocol.js +++ b/lib/shared/threads/protocols/keyserver-thread-protocol.js @@ -299,6 +299,8 @@ }, uploadMultimediaMetadataToKeyserver: true, + + canActionsTargetPendingMessages: false, }); function mediaIDIsKeyserverID(mediaID: string): boolean { diff --git a/lib/shared/threads/thread-spec.js b/lib/shared/threads/thread-spec.js --- a/lib/shared/threads/thread-spec.js +++ b/lib/shared/threads/thread-spec.js @@ -214,6 +214,7 @@ +breadCrumbs: (ancestorPath: React.Node) => React.Node, }, +uploadMultimediaMetadataToKeyserver: boolean, + +canActionsTargetPendingMessages: boolean, }; export type ThreadSpec = {