Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/messages/sidebar-source-message-spec.js
Show All 11 Lines | |||||
import type { PlatformDetails } from '../../types/device-types.js'; | import type { PlatformDetails } from '../../types/device-types.js'; | ||||
import { messageTypes } from '../../types/message-types-enum.js'; | import { messageTypes } from '../../types/message-types-enum.js'; | ||||
import { | import { | ||||
type RawSidebarSourceMessageInfo, | type RawSidebarSourceMessageInfo, | ||||
type SidebarSourceMessageData, | type SidebarSourceMessageData, | ||||
type SidebarSourceMessageInfo, | type SidebarSourceMessageInfo, | ||||
type ClientDBMessageInfo, | type ClientDBMessageInfo, | ||||
isMessageSidebarSourceReactionOrEdit, | isMessageSidebarSourceReactionOrEdit, | ||||
rawSidebarSourceMessageInfoValidator, | |||||
} from '../../types/message-types.js'; | } from '../../types/message-types.js'; | ||||
import type { RawUnsupportedMessageInfo } from '../../types/messages/unsupported.js'; | import type { RawUnsupportedMessageInfo } from '../../types/messages/unsupported.js'; | ||||
import type { NotifTexts } from '../../types/notif-types.js'; | import type { NotifTexts } from '../../types/notif-types.js'; | ||||
import type { RelativeUserInfo } from '../../types/user-types.js'; | import type { RelativeUserInfo } from '../../types/user-types.js'; | ||||
import { hasMinCodeVersion } from '../version-utils.js'; | import { hasMinCodeVersion } from '../version-utils.js'; | ||||
export const sidebarSourceMessageSpec: MessageSpec< | export const sidebarSourceMessageSpec: MessageSpec< | ||||
SidebarSourceMessageData, | SidebarSourceMessageData, | ||||
▲ Show 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | > = Object.freeze({ | ||||
notificationCollapseKey(rawMessageInfo: RawSidebarSourceMessageInfo): string { | notificationCollapseKey(rawMessageInfo: RawSidebarSourceMessageInfo): string { | ||||
return joinResult(messageTypes.CREATE_SIDEBAR, rawMessageInfo.threadID); | return joinResult(messageTypes.CREATE_SIDEBAR, rawMessageInfo.threadID); | ||||
}, | }, | ||||
generatesNotifs: async () => pushTypes.NOTIF, | generatesNotifs: async () => pushTypes.NOTIF, | ||||
startsThread: true, | startsThread: true, | ||||
validator: rawSidebarSourceMessageInfoValidator, | |||||
}); | }); |