Introduce new remote flag for storage service write behavior
This commit is contained in:
parent
b2634d1cb9
commit
4c98b4a96f
3 changed files with 24 additions and 0 deletions
|
@ -3084,6 +3084,14 @@
|
|||
// [X] whitelisted
|
||||
// [X] archived
|
||||
captureChange() {
|
||||
if (!window.Signal.RemoteConfig.isEnabled('desktop.storageWrite')) {
|
||||
window.log.info(
|
||||
'conversation.captureChange: Returning early; desktop.storageWrite is falsey'
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this.set({ needsStorageServiceSync: true });
|
||||
|
||||
this.queueJob(() => {
|
||||
|
|
|
@ -6,6 +6,7 @@ type ConfigKeyType =
|
|||
| 'desktop.gv2'
|
||||
| 'desktop.cds'
|
||||
| 'desktop.storage'
|
||||
| 'desktop.storageWrite'
|
||||
| 'desktop.clientExpiration';
|
||||
type ConfigValueType = {
|
||||
name: ConfigKeyType;
|
||||
|
|
|
@ -665,6 +665,10 @@ async function processManifest(
|
|||
|
||||
export async function runStorageServiceSyncJob(): Promise<void> {
|
||||
if (!isEnabled('desktop.storage')) {
|
||||
window.log.info(
|
||||
'storageService.runStorageServiceSyncJob: Not starting desktop.storage is falsey'
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -738,6 +742,17 @@ export async function eraseAllStorageServiceState(): Promise<void> {
|
|||
|
||||
async function nondebouncedStorageServiceUploadJob(): Promise<void> {
|
||||
if (!isEnabled('desktop.storage')) {
|
||||
window.log.info(
|
||||
'storageService.storageServiceUploadJob: Not starting desktop.storage is falsey'
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
if (!isEnabled('desktop.storageWrite')) {
|
||||
window.log.info(
|
||||
'storageService.storageServiceUploadJob: Not starting desktop.storageWrite is falsey'
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue