Enable stories in beta builds

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
automated-signal 2022-10-07 15:12:10 -07:00 committed by GitHub
parent 7b39315439
commit f9c473768c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View File

@ -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;

View File

@ -34,6 +34,10 @@ const releaseNotes: ReleaseNotesType = {
key: 'WhatsNew__v5.63--0',
components: undefined,
},
{
key: 'WhatsNew__v5.63--beta.2',
components: undefined,
},
],
};

View File

@ -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();