Enable storage service for everyone

This commit is contained in:
Evan Hahn 2021-10-05 12:04:28 -05:00 committed by GitHub
parent 5fdfa1c632
commit 3eff5b73d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 36 deletions

View File

@ -16,7 +16,6 @@ import {
} from '../../util/libphonenumberInstance';
import { assert } from '../../util/assert';
import { missingCaseError } from '../../util/missingCaseError';
import { isStorageWriteFeatureEnabled } from '../../storage/isFeatureEnabled';
export type LeftPaneComposePropsType = {
composeContacts: ReadonlyArray<ContactListItemPropsType>;
@ -229,7 +228,7 @@ export class LeftPaneComposeHelper extends LeftPaneHelper<LeftPaneComposePropsTy
if (this.phoneNumber) {
return TopButton.StartNewConversation;
}
if (this.searchTerm || !isStorageWriteFeatureEnabled()) {
if (this.searchTerm) {
return TopButton.None;
}
return TopButton.CreateNewGroup;

View File

@ -19,7 +19,6 @@ import {
GROUP_CREDENTIALS_KEY,
maybeFetchNewCredentials,
} from './services/groupCredentialFetcher';
import { isStorageWriteFeatureEnabled } from './storage/isFeatureEnabled';
import dataInterface from './sql/Client';
import { toWebSafeBase64, fromWebSafeBase64 } from './util/webSafeBase64';
import { assert, strictAssert } from './util/assert';
@ -1500,12 +1499,6 @@ export async function createGroupV2({
// Ensure we have the credentials we need before attempting GroupsV2 operations
await maybeFetchNewCredentials();
if (!isStorageWriteFeatureEnabled()) {
throw new Error(
'createGroupV2: storage service write is not enabled. Cannot create the group'
);
}
const ACCESS_ENUM = Proto.AccessControl.AccessRequired;
const MEMBER_ROLE_ENUM = Proto.Member.Role;

View File

@ -32,7 +32,6 @@ import { storageJobQueue } from '../util/JobQueue';
import { sleep } from '../util/sleep';
import { isMoreRecentThan } from '../util/timestamp';
import { normalizeNumber } from '../util/normalizeNumber';
import { isStorageWriteFeatureEnabled } from '../storage/isFeatureEnabled';
import { ourProfileKeyService } from './ourProfileKey';
import {
ConversationTypes,
@ -1019,12 +1018,6 @@ async function processRemoteRecords(
async function sync(
ignoreConflicts = false
): Promise<Proto.ManifestRecord | undefined> {
if (!isStorageWriteFeatureEnabled()) {
log.info('storageService.sync: Not starting desktop.storage is falsey');
return undefined;
}
if (!window.storage.get('storageKey')) {
throw new Error('storageService.sync: Cannot start; no storage key!');
}
@ -1081,14 +1074,6 @@ async function sync(
}
async function upload(fromSync = false): Promise<void> {
if (!isStorageWriteFeatureEnabled()) {
log.info(
'storageService.upload: Not starting because the feature is not enabled'
);
return;
}
if (!window.textsecure.messaging) {
throw new Error('storageService.upload: We are offline!');
}

View File

@ -1,12 +0,0 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { isEnabled } from '../RemoteConfig';
function isStorageFeatureEnabled(): boolean {
return isEnabled('desktop.storage');
}
export function isStorageWriteFeatureEnabled(): boolean {
return isStorageFeatureEnabled() && isEnabled('desktop.storageWrite3');
}