diff --git a/lib/shared/messages/sidebar-source-message-spec.js b/lib/shared/messages/sidebar-source-message-spec.js --- a/lib/shared/messages/sidebar-source-message-spec.js +++ b/lib/shared/messages/sidebar-source-message-spec.js @@ -6,13 +6,11 @@ pushTypes, type CreateMessageInfoParams, type MessageSpec, - type NotificationTextsParams, type RawMessageInfoFromServerDBRowParams, } from './message-spec.js'; -import { assertSingleMessageInfo, joinResult } from './utils.js'; +import { joinResult } from './utils.js'; import type { PlatformDetails } from '../../types/device-types.js'; import type { - MessageInfo, RawSidebarSourceMessageInfo, SidebarSourceMessageData, SidebarSourceMessageInfo, @@ -21,7 +19,6 @@ import { messageTypes } from '../../types/message-types.js'; import type { RawUnsupportedMessageInfo } from '../../types/messages/unsupported.js'; import type { NotifTexts } from '../../types/notif-types.js'; -import type { ThreadInfo } from '../../types/thread-types.js'; import type { RelativeUserInfo } from '../../types/user-types.js'; import { hasMinCodeVersion } from '../version-utils.js'; @@ -137,7 +134,6 @@ rawMessageInfo: RawSidebarSourceMessageInfo, platformDetails: ?PlatformDetails, ): RawSidebarSourceMessageInfo | RawUnsupportedMessageInfo { - // TODO determine min code version if ( hasMinCodeVersion(platformDetails, 75) && rawMessageInfo.sourceMessage @@ -164,18 +160,11 @@ return unwrapped; }, - async notificationTexts( - messageInfos: $ReadOnlyArray, - threadInfo: ThreadInfo, - params: NotificationTextsParams, - ): Promise { - const messageInfo = assertSingleMessageInfo(messageInfos); + notificationTexts(): Promise { invariant( - messageInfo.type === messageTypes.SIDEBAR_SOURCE, - 'messageInfo should be messageTypes.SIDEBAR_SOURCE!', + false, + 'SIDEBAR_SOURCE notificationTexts should never be called directly!', ); - const sourceMessageInfo = messageInfo.sourceMessage; - return await params.notificationTexts([sourceMessageInfo], threadInfo); }, notificationCollapseKey(rawMessageInfo: RawSidebarSourceMessageInfo): string {