diff --git a/lib/shared/messages/create-sidebar-message-spec.js b/lib/shared/messages/create-sidebar-message-spec.js --- a/lib/shared/messages/create-sidebar-message-spec.js +++ b/lib/shared/messages/create-sidebar-message-spec.js @@ -10,7 +10,6 @@ type RobotextParams, } from './message-spec.js'; import { joinResult } from './utils.js'; -import type { PlatformDetails } from '../../types/device-types.js'; import { messageTypes } from '../../types/message-types-enum.js'; import type { MessageInfo, @@ -22,7 +21,6 @@ type RawCreateSidebarMessageInfo, rawCreateSidebarMessageInfoValidator, } from '../../types/messages/create-sidebar.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'; @@ -32,7 +30,6 @@ pluralizeEntityText, } from '../../utils/entity-text.js'; import { notifTextsForSidebarCreation } from '../notif-utils.js'; -import { hasMinCodeVersion } from '../version-utils.js'; export const createSidebarMessageSpec: MessageSpec< CreateSidebarMessageData, @@ -158,26 +155,6 @@ return ET`${creator} ${text}`; }, - shimUnsupportedMessageInfo( - rawMessageInfo: RawCreateSidebarMessageInfo, - platformDetails: ?PlatformDetails, - ): RawCreateSidebarMessageInfo | RawUnsupportedMessageInfo { - if (hasMinCodeVersion(platformDetails, { native: 75 })) { - return rawMessageInfo; - } - const { id } = rawMessageInfo; - invariant(id !== null && id !== undefined, 'id should be set on server'); - return { - type: messageTypes.UNSUPPORTED, - id, - threadID: rawMessageInfo.threadID, - creatorID: rawMessageInfo.creatorID, - time: rawMessageInfo.time, - robotext: 'created a thread', - unsupportedMessageInfo: rawMessageInfo, - }; - }, - unshimMessageInfo( unwrapped: RawCreateSidebarMessageInfo, ): RawCreateSidebarMessageInfo { 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 @@ -9,7 +9,6 @@ type RawMessageInfoFromServerDBRowParams, } from './message-spec.js'; import { joinResult } from './utils.js'; -import type { PlatformDetails } from '../../types/device-types.js'; import { messageTypes } from '../../types/message-types-enum.js'; import { type RawSidebarSourceMessageInfo, @@ -22,7 +21,6 @@ import type { RawUnsupportedMessageInfo } from '../../types/messages/unsupported.js'; import type { NotifTexts } from '../../types/notif-types.js'; import type { RelativeUserInfo } from '../../types/user-types.js'; -import { hasMinCodeVersion } from '../version-utils.js'; export const sidebarSourceMessageSpec: MessageSpec< SidebarSourceMessageData, @@ -132,12 +130,8 @@ shimUnsupportedMessageInfo( rawMessageInfo: RawSidebarSourceMessageInfo, - platformDetails: ?PlatformDetails, ): RawSidebarSourceMessageInfo | RawUnsupportedMessageInfo { - if ( - hasMinCodeVersion(platformDetails, { native: 75 }) && - rawMessageInfo.sourceMessage - ) { + if (rawMessageInfo.sourceMessage) { return rawMessageInfo; } const { id } = rawMessageInfo; diff --git a/lib/shared/messages/update-relationship-message-spec.js b/lib/shared/messages/update-relationship-message-spec.js --- a/lib/shared/messages/update-relationship-message-spec.js +++ b/lib/shared/messages/update-relationship-message-spec.js @@ -8,13 +8,11 @@ type MessageSpec, } from './message-spec.js'; import { assertSingleMessageInfo } from './utils.js'; -import type { PlatformDetails } from '../../types/device-types.js'; import { messageTypes } from '../../types/message-types-enum.js'; import type { MessageInfo, ClientDBMessageInfo, } from '../../types/message-types.js'; -import type { RawUnsupportedMessageInfo } from '../../types/messages/unsupported.js'; import { type RawUpdateRelationshipMessageInfo, type UpdateRelationshipMessageData, @@ -25,7 +23,6 @@ import type { ThreadInfo } from '../../types/thread-types.js'; import type { RelativeUserInfo } from '../../types/user-types.js'; import { ET, type EntityText } from '../../utils/entity-text.js'; -import { hasMinCodeVersion } from '../version-utils.js'; export const updateRelationshipMessageSpec: MessageSpec< UpdateRelationshipMessageData, @@ -128,26 +125,6 @@ ); }, - shimUnsupportedMessageInfo( - rawMessageInfo: RawUpdateRelationshipMessageInfo, - platformDetails: ?PlatformDetails, - ): RawUpdateRelationshipMessageInfo | RawUnsupportedMessageInfo { - if (hasMinCodeVersion(platformDetails, { native: 71 })) { - return rawMessageInfo; - } - const { id } = rawMessageInfo; - invariant(id !== null && id !== undefined, 'id should be set on server'); - return { - type: messageTypes.UNSUPPORTED, - id, - threadID: rawMessageInfo.threadID, - creatorID: rawMessageInfo.creatorID, - time: rawMessageInfo.time, - robotext: 'performed a relationship action', - unsupportedMessageInfo: rawMessageInfo, - }; - }, - unshimMessageInfo( unwrapped: RawUpdateRelationshipMessageInfo, ): RawUpdateRelationshipMessageInfo {