Remove most uses of desktop.pnp remote config

This commit is contained in:
Fedor Indutny 2024-01-25 14:00:04 -08:00 committed by GitHub
parent 78fbd8c8ce
commit d31d6474fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 6 deletions

View file

@ -23,7 +23,6 @@ export type ConfigKeyType =
| 'desktop.mediaQuality.levels'
| 'desktop.messageCleanup'
| 'desktop.pnp'
| 'desktop.pnp.accountE164Deprecation'
| 'desktop.retryRespondMaxAge'
| 'desktop.senderKey.retry'
| 'desktop.senderKeyMaxAge'

View file

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