diff --git a/lib/shared/messages/add-members-message-spec.js b/lib/shared/messages/add-members-message-spec.js --- a/lib/shared/messages/add-members-message-spec.js +++ b/lib/shared/messages/add-members-message-spec.js @@ -7,6 +7,7 @@ MessageSpec, NotificationTextsParams, MergeRobotextMessageItemResult, + ShowInMessagePreviewParams, } from './message-spec.js'; import { joinResult } from './utils.js'; import type { RobotextChatMessageInfoItem } from '../../selectors/chat-selectors.js'; @@ -23,6 +24,7 @@ } from '../../types/messages/add-members.js'; import type { ThreadInfo } from '../../types/minimally-encoded-thread-permissions-types.js'; import type { NotifTexts } from '../../types/notif-types.js'; +import { threadTypeIsThick } from '../../types/thread-types-enum.js'; import type { RelativeUserInfo } from '../../types/user-types.js'; import { type EntityText, @@ -224,4 +226,9 @@ }; return { shouldMerge: true, item: mergedItem }; }, + + showInMessagePreview: async ( + messageInfo: AddMembersMessageInfo, + params: ShowInMessagePreviewParams, + ) => threadTypeIsThick(params.threadInfo.type), }); diff --git a/lib/shared/messages/join-thread-message-spec.js b/lib/shared/messages/join-thread-message-spec.js --- a/lib/shared/messages/join-thread-message-spec.js +++ b/lib/shared/messages/join-thread-message-spec.js @@ -6,6 +6,7 @@ MessageSpec, RobotextParams, MergeRobotextMessageItemResult, + ShowInMessagePreviewParams, } from './message-spec.js'; import { joinResult } from './utils.js'; import type { RobotextChatMessageInfoItem } from '../../selectors/chat-selectors.js'; @@ -22,6 +23,7 @@ } from '../../types/messages/join-thread.js'; import type { ThreadInfo } from '../../types/minimally-encoded-thread-permissions-types.js'; import type { NotifTexts } from '../../types/notif-types.js'; +import { threadTypeIsThick } from '../../types/thread-types-enum.js'; import type { RelativeUserInfo } from '../../types/user-types.js'; import { type EntityText, @@ -170,4 +172,9 @@ }; return { shouldMerge: true, item: mergedItem }; }, + + showInMessagePreview: async ( + messageInfo: JoinThreadMessageInfo, + params: ShowInMessagePreviewParams, + ) => threadTypeIsThick(params.threadInfo.type), }); diff --git a/lib/shared/messages/leave-thread-message-spec.js b/lib/shared/messages/leave-thread-message-spec.js --- a/lib/shared/messages/leave-thread-message-spec.js +++ b/lib/shared/messages/leave-thread-message-spec.js @@ -6,6 +6,7 @@ MessageSpec, RobotextParams, MergeRobotextMessageItemResult, + ShowInMessagePreviewParams, } from './message-spec.js'; import { joinResult } from './utils.js'; import type { RobotextChatMessageInfoItem } from '../../selectors/chat-selectors.js'; @@ -22,6 +23,7 @@ } from '../../types/messages/leave-thread.js'; import type { ThreadInfo } from '../../types/minimally-encoded-thread-permissions-types.js'; import type { NotifTexts } from '../../types/notif-types.js'; +import { threadTypeIsThick } from '../../types/thread-types-enum.js'; import type { RelativeUserInfo } from '../../types/user-types.js'; import { type EntityText, @@ -170,4 +172,9 @@ }; return { shouldMerge: true, item: mergedItem }; }, + + showInMessagePreview: async ( + messageInfo: LeaveThreadMessageInfo, + params: ShowInMessagePreviewParams, + ) => threadTypeIsThick(params.threadInfo.type), }); diff --git a/lib/shared/messages/remove-members-message-spec.js b/lib/shared/messages/remove-members-message-spec.js --- a/lib/shared/messages/remove-members-message-spec.js +++ b/lib/shared/messages/remove-members-message-spec.js @@ -7,6 +7,7 @@ MessageSpec, NotificationTextsParams, MergeRobotextMessageItemResult, + ShowInMessagePreviewParams, } from './message-spec.js'; import { joinResult } from './utils.js'; import type { RobotextChatMessageInfoItem } from '../../selectors/chat-selectors.js'; @@ -23,6 +24,7 @@ } from '../../types/messages/remove-members.js'; import type { ThreadInfo } from '../../types/minimally-encoded-thread-permissions-types.js'; import type { NotifTexts } from '../../types/notif-types.js'; +import { threadTypeIsThick } from '../../types/thread-types-enum.js'; import type { RelativeUserInfo } from '../../types/user-types.js'; import { type EntityText, @@ -230,5 +232,10 @@ }; return { shouldMerge: true, item: mergedItem }; }, + + showInMessagePreview: async ( + messageInfo: RemoveMembersMessageInfo, + params: ShowInMessagePreviewParams, + ) => threadTypeIsThick(params.threadInfo.type), }, );