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 @@ -14,6 +14,7 @@ } 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 { useSelector } from '../utils/redux-utils.js'; function useViewerAlreadySelectedMessageReactions( @@ -92,8 +93,9 @@ } if ( - !targetMessageInfo.id || - threadInfo.sourceMessageID === targetMessageInfo.id + (!targetMessageInfo.id && !threadTypeIsThick(threadInfo.type)) || + (threadInfo.sourceMessageID && + threadInfo.sourceMessageID === targetMessageInfo.id) ) { return false; } 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 @@ -206,12 +206,14 @@ threadPermissions.CREATE_SIDEBARS, ); if (!hasCreateSidebarsPermission) { + console.log('1'); return false; } if ( - !messageInfo.id || - threadInfo.sourceMessageID === messageInfo.id || + (!messageInfo.id && !threadTypeIsThick(threadInfo.type)) || + (threadInfo.sourceMessageID && + threadInfo.sourceMessageID === messageInfo.id) || isInvalidSidebarSource(messageInfo) ) { return false; @@ -232,6 +234,7 @@ threadInfo, messageItem.messageInfo, ); + console.log(canCreateSidebarFromMessage); return !!messageItem.threadCreatedFromMessage || canCreateSidebarFromMessage; }