Skip to content

Commit

Permalink
Enable storage service for everyone
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn-Signal committed Oct 5, 2021
1 parent 5fdfa1c commit 3eff5b7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 36 deletions.
3 changes: 1 addition & 2 deletions ts/components/leftPane/LeftPaneComposeHelper.tsx
Expand Up @@ -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>;
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 0 additions & 7 deletions ts/groups.ts
Expand Up @@ -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';
Expand Down Expand Up @@ -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;

Expand Down
15 changes: 0 additions & 15 deletions ts/services/storage.ts
Expand Up @@ -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,
Expand Down Expand Up @@ -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!');
}
Expand Down Expand Up @@ -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!');
}
Expand Down
12 changes: 0 additions & 12 deletions ts/storage/isFeatureEnabled.ts

This file was deleted.

0 comments on commit 3eff5b7

Please sign in to comment.