Skip to content

Commit

Permalink
Remove most uses of desktop.pnp remote config
Browse files Browse the repository at this point in the history
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
  • Loading branch information
automated-signal and indutny-signal committed Jan 25, 2024
1 parent 61d65e7 commit 542c350
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion ts/RemoteConfig.ts
Expand Up @@ -23,7 +23,6 @@ export type ConfigKeyType =
| 'desktop.mediaQuality.levels'
| 'desktop.messageCleanup'
| 'desktop.pnp'
| 'desktop.pnp.accountE164Deprecation'
| 'desktop.retryRespondMaxAge'
| 'desktop.senderKey.retry'
| 'desktop.senderKeyMaxAge'
Expand Down
7 changes: 2 additions & 5 deletions ts/services/storageRecordOps.ts
Expand Up @@ -62,7 +62,6 @@ import type {
} from '../sql/Interface';
import dataInterface from '../sql/Client';
import { MY_STORY_ID, StorySendMode } from '../types/Stories';
import * as RemoteConfig from '../RemoteConfig';
import { findAndDeleteOnboardingStoryIfExists } from '../util/findAndDeleteOnboardingStoryIfExists';
import { downloadOnboardingStory } from '../util/downloadOnboardingStory';
import { drop } from '../util/drop';
Expand Down Expand Up @@ -174,7 +173,7 @@ export async function toContactRecord(
contactRecord.username = username;
}
const pni = conversation.getPni();
if (pni && RemoteConfig.isEnabled('desktop.pnp')) {
if (pni) {
contactRecord.pni = toUntaggedPni(pni);
}
const profileKey = conversation.get('profileKey');
Expand Down Expand Up @@ -989,11 +988,9 @@ export async function mergeContactRecord(
: undefined,
};

const isPniSupported = RemoteConfig.isEnabled('desktop.pnp');

const e164 = dropNull(contactRecord.serviceE164);
const { aci } = contactRecord;
const pni = isPniSupported ? dropNull(contactRecord.pni) : undefined;
const pni = dropNull(contactRecord.pni);
const serviceId = aci || pni;

// All contacts must have UUID
Expand Down

0 comments on commit 542c350

Please sign in to comment.