diff --git a/src/api/types/misc.ts b/src/api/types/misc.ts index ac47af004..a2b4d5709 100644 --- a/src/api/types/misc.ts +++ b/src/api/types/misc.ts @@ -220,7 +220,7 @@ export interface ApiAppConfig { topicsPinnedLimit: number; hiddenMembersMinCount: number; limits: Record; - canDisplayAutoarchiveSetting: boolean; + canDisplayAutoarchiveSetting?: boolean; storyViewersExpirePeriod: number; storyChangelogUserId: string; maxPinnedStoriesCount: number; diff --git a/src/components/left/settings/SettingsPrivacy.tsx b/src/components/left/settings/SettingsPrivacy.tsx index 7e946c983..422b217ce 100644 --- a/src/components/left/settings/SettingsPrivacy.tsx +++ b/src/components/left/settings/SettingsPrivacy.tsx @@ -481,15 +481,16 @@ export default memo(withGlobal( const { canDisplayChatInTitle } = selectSharedSettings(global); const shouldChargeForMessages = Boolean(nonContactPeersPaidStars); const isCurrentUserFrozen = selectIsCurrentUserFrozen(global); + const isCurrentUserPremium = selectIsCurrentUserPremium(global); return { - isCurrentUserPremium: selectIsCurrentUserPremium(global), + isCurrentUserPremium, hasPassword, hasPasscode: Boolean(hasPasscode), blockedCount: blocked.totalCount, webAuthCount: global.activeWebSessions.orderedHashes.length, isSensitiveEnabled, - canDisplayAutoarchiveSetting: Boolean(appConfig.canDisplayAutoarchiveSetting), + canDisplayAutoarchiveSetting: appConfig.canDisplayAutoarchiveSetting || isCurrentUserPremium, shouldArchiveAndMuteNewNonContact, canChangeSensitive, shouldNewNonContactPeersRequirePremium, diff --git a/src/limits.ts b/src/limits.ts index 7e32e2aec..c8fa04d34 100644 --- a/src/limits.ts +++ b/src/limits.ts @@ -58,7 +58,6 @@ export const DEFAULT_APP_CONFIG: ApiAppConfig = { moreAccounts: DEFAULT_LIMITS.moreAccounts, maxReactions: DEFAULT_LIMITS.maxReactions, }, - canDisplayAutoarchiveSetting: true, autologinDomains: [ 'instantview.telegram.org', 'translations.telegram.org',