Introduce desktop.pnp.storageService flag
This commit is contained in:
parent
647335086d
commit
96c4cc4bcf
|
@ -191,7 +191,7 @@
|
|||
"@babel/preset-typescript": "7.17.12",
|
||||
"@electron/fuses": "1.5.0",
|
||||
"@mixer/parallel-prettier": "2.0.1",
|
||||
"@signalapp/mock-server": "2.6.0",
|
||||
"@signalapp/mock-server": "2.7.0",
|
||||
"@storybook/addon-a11y": "6.5.6",
|
||||
"@storybook/addon-actions": "6.5.6",
|
||||
"@storybook/addon-controls": "6.5.6",
|
||||
|
|
|
@ -16,6 +16,7 @@ export type ConfigKeyType =
|
|||
| 'desktop.mediaQuality.levels'
|
||||
| 'desktop.messageCleanup'
|
||||
| 'desktop.messageRequests'
|
||||
| 'desktop.pnp.storageService'
|
||||
| 'desktop.retryReceiptLifespan'
|
||||
| 'desktop.retryRespondMaxAge'
|
||||
| 'desktop.senderKey.retry'
|
||||
|
|
|
@ -51,6 +51,7 @@ import type {
|
|||
} from '../sql/Interface';
|
||||
import dataInterface from '../sql/Client';
|
||||
import { MY_STORIES_ID } from '../types/Stories';
|
||||
import * as RemoteConfig from '../RemoteConfig';
|
||||
|
||||
const MY_STORIES_BYTES = uuidToBytes(MY_STORIES_ID);
|
||||
|
||||
|
@ -138,7 +139,7 @@ export async function toContactRecord(
|
|||
contactRecord.serviceE164 = e164;
|
||||
}
|
||||
const pni = conversation.get('pni');
|
||||
if (pni) {
|
||||
if (pni && RemoteConfig.isEnabled('desktop.pnp.storageService')) {
|
||||
contactRecord.pni = pni;
|
||||
}
|
||||
const profileKey = conversation.get('profileKey');
|
||||
|
@ -851,9 +852,11 @@ export async function mergeContactRecord(
|
|||
: undefined,
|
||||
};
|
||||
|
||||
const isPniSupported = RemoteConfig.isEnabled('desktop.pnp.storageService');
|
||||
|
||||
const e164 = dropNull(contactRecord.serviceE164);
|
||||
const uuid = dropNull(contactRecord.serviceUuid);
|
||||
const pni = dropNull(contactRecord.pni);
|
||||
const pni = isPniSupported ? dropNull(contactRecord.pni) : undefined;
|
||||
|
||||
// All contacts must have UUID
|
||||
if (!uuid) {
|
||||
|
|
|
@ -1753,10 +1753,10 @@
|
|||
node-gyp-build "^4.2.3"
|
||||
uuid "^8.3.0"
|
||||
|
||||
"@signalapp/mock-server@2.6.0":
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@signalapp/mock-server/-/mock-server-2.6.0.tgz#64277abd5ad5a540c0ae7e98d0347b420d69acfd"
|
||||
integrity sha512-EYI52E0ZwtNO0tt7V7PZJ5vs5Yy/nReHZMWovfHqcdG3iurwxq4/YIbz0fP4HylpoiJLbZ1cVzY7A8A3IAlrLQ==
|
||||
"@signalapp/mock-server@2.7.0":
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@signalapp/mock-server/-/mock-server-2.7.0.tgz#92c6538c44eb6001f7fb5b85cb1c41ad1d4a64bc"
|
||||
integrity sha512-Adf+EOs/YesNQ4ZsxVxAdhFjtVd4f246RwADMD6A50X4hrp78eW2WkFpZ7fWDMy3ZIRiNa87aZXRbWEzFEzIzA==
|
||||
dependencies:
|
||||
"@signalapp/libsignal-client" "^0.19.2"
|
||||
debug "^4.3.2"
|
||||
|
|
Loading…
Reference in New Issue