diff --git a/ts/RemoteConfig.ts b/ts/RemoteConfig.ts index c10407034..64bf47d36 100644 --- a/ts/RemoteConfig.ts +++ b/ts/RemoteConfig.ts @@ -30,11 +30,13 @@ export type ConfigKeyType = | 'desktop.showUserBadges.beta' | 'desktop.showUserBadges2' | 'desktop.stories' + | 'desktop.stories.beta' | 'desktop.usernames' | 'global.attachments.maxBytes' | 'global.calling.maxGroupCallRingSize' | 'global.groupsv2.groupSizeHardLimit' | 'global.groupsv2.maxGroupSize'; + type ConfigValueType = { name: ConfigKeyType; enabled: boolean; diff --git a/ts/components/WhatsNewModal.tsx b/ts/components/WhatsNewModal.tsx index f316bab7c..0745f7411 100644 --- a/ts/components/WhatsNewModal.tsx +++ b/ts/components/WhatsNewModal.tsx @@ -34,6 +34,10 @@ const releaseNotes: ReleaseNotesType = { key: 'WhatsNew__v5.63--0', components: undefined, }, + { + key: 'WhatsNew__v5.63--beta.2', + components: undefined, + }, ], }; diff --git a/ts/types/Stories.ts b/ts/types/Stories.ts index fef9a7fdf..415562ce9 100644 --- a/ts/types/Stories.ts +++ b/ts/types/Stories.ts @@ -10,6 +10,7 @@ import type { SendStatus } from '../messages/MessageSendState'; import type { StoryDistributionListDataType } from '../state/ducks/storyDistributionLists'; import type { UUIDStringType } from './UUID'; import { isEnabled } from '../RemoteConfig'; +import { isBeta } from '../util/version'; export type ReplyType = { author: Pick< @@ -145,7 +146,11 @@ export enum HasStories { } const getStoriesAvailable = () => - isEnabled('desktop.stories') || isEnabled('desktop.internalUser'); + isEnabled('desktop.stories') || + isEnabled('desktop.internalUser') || + (isEnabled('desktop.stories.beta') && isBeta(window.getVersion())); + const getStoriesDisabled = () => window.Events.getHasStoriesDisabled(); + export const getStoriesBlocked = (): boolean => !getStoriesAvailable() || getStoriesDisabled();