Add more granularity to accountE164 deprecation
This commit is contained in:
@@ -30,6 +30,7 @@ export type ConfigKeyType =
|
|||||||
| 'desktop.messageCleanup'
|
| 'desktop.messageCleanup'
|
||||||
| 'desktop.messageRequests'
|
| 'desktop.messageRequests'
|
||||||
| 'desktop.pnp'
|
| 'desktop.pnp'
|
||||||
|
| 'desktop.pnp.accountE164Deprecation'
|
||||||
| 'desktop.retryRespondMaxAge'
|
| 'desktop.retryRespondMaxAge'
|
||||||
| 'desktop.safetyNumberAci'
|
| 'desktop.safetyNumberAci'
|
||||||
| 'desktop.safetyNumberAci.beta'
|
| 'desktop.safetyNumberAci.beta'
|
||||||
|
@@ -24,6 +24,7 @@ import {
|
|||||||
PhoneNumberDiscoverability,
|
PhoneNumberDiscoverability,
|
||||||
parsePhoneNumberDiscoverability,
|
parsePhoneNumberDiscoverability,
|
||||||
} from '../util/phoneNumberDiscoverability';
|
} from '../util/phoneNumberDiscoverability';
|
||||||
|
import { isPnpEnabled } from '../util/isPnpEnabled';
|
||||||
import { arePinnedConversationsEqual } from '../util/arePinnedConversationsEqual';
|
import { arePinnedConversationsEqual } from '../util/arePinnedConversationsEqual';
|
||||||
import type { ConversationModel } from '../models/conversations';
|
import type { ConversationModel } from '../models/conversations';
|
||||||
import {
|
import {
|
||||||
@@ -1219,9 +1220,13 @@ export async function mergeAccountRecord(
|
|||||||
await window.storage.put('primarySendsSms', primarySendsSms);
|
await window.storage.put('primarySendsSms', primarySendsSms);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof accountE164 === 'string' && accountE164) {
|
if (typeof accountE164 === 'string') {
|
||||||
await window.storage.put('accountE164', accountE164);
|
await window.storage.put('accountE164', accountE164);
|
||||||
if (!RemoteConfig.isEnabled('desktop.pnp')) {
|
if (
|
||||||
|
!RemoteConfig.isEnabled('desktop.pnp') &&
|
||||||
|
!RemoteConfig.isEnabled('desktop.pnp.accountE164Deprecation') &&
|
||||||
|
!isPnpEnabled()
|
||||||
|
) {
|
||||||
await window.storage.user.setNumber(accountE164);
|
await window.storage.user.setNumber(accountE164);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user