Add a remote config option to disable libsignal transport in prod

Co-authored-by: Sergey Skrobotov <sergey@signal.org>
This commit is contained in:
automated-signal 2024-04-18 14:01:37 -05:00 committed by GitHub
parent 4e491b611f
commit 868c012945
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View file

@ -27,6 +27,7 @@ export type ConfigKeyType =
| 'desktop.senderKeyMaxAge'
| 'desktop.experimentalTransportEnabled.alpha'
| 'desktop.experimentalTransportEnabled.beta'
| 'desktop.experimentalTransportEnabled.prod'
| 'desktop.cdsiViaLibsignal'
| 'global.attachments.maxBytes'
| 'global.attachments.maxReceiveBytes'

View file

@ -559,8 +559,14 @@ export class SocketManager extends EventListener {
: TransportOption.ShadowingLow;
}
// in prod, using original
return TransportOption.ShadowingLow;
// in prod, switch to using 'ShadowingHigh' mode, unless user opts out,
// in which case switching to `ShadowingLow`
const configValue = window.Signal.RemoteConfig.isEnabled(
'desktop.experimentalTransportEnabled.prod'
);
return configValue
? TransportOption.ShadowingLow
: TransportOption.Original;
}
private connectLibsignalUnauthenticated(): AbortableProcess<IWebSocketResource> {