remote config for making CDSI lookups via libsignal
This commit is contained in:
parent
bcf12e20c4
commit
cf02337d6d
3 changed files with 10 additions and 1 deletions
|
@ -27,6 +27,7 @@ export type ConfigKeyType =
|
|||
| 'desktop.senderKeyMaxAge'
|
||||
| 'desktop.experimentalTransportEnabled.alpha'
|
||||
| 'desktop.experimentalTransportEnabled.beta'
|
||||
| 'desktop.cdsiViaLibsignal'
|
||||
| 'global.attachments.maxBytes'
|
||||
| 'global.attachments.maxReceiveBytes'
|
||||
| 'global.calling.maxGroupCallRingSize'
|
||||
|
|
|
@ -359,7 +359,7 @@ export class WebSocketResourceWithShadowing implements IWebSocketResource {
|
|||
|
||||
private updateStats(name: string) {
|
||||
const storedStats = AggregatedStats.loadOrCreateEmpty(name);
|
||||
const updatedStats = AggregatedStats.add(storedStats, this.stats);
|
||||
let updatedStats = AggregatedStats.add(storedStats, this.stats);
|
||||
if (
|
||||
this.shadowingWithReporting &&
|
||||
AggregatedStats.shouldReportError(updatedStats) &&
|
||||
|
@ -368,6 +368,11 @@ export class WebSocketResourceWithShadowing implements IWebSocketResource {
|
|||
window.reduxActions.toast.showToast({
|
||||
toastType: ToastType.TransportError,
|
||||
});
|
||||
log.warn(
|
||||
`${this.logId}: experimental transport toast displayed, flushing transport statistics before resetting`,
|
||||
updatedStats
|
||||
);
|
||||
updatedStats = AggregatedStats.createEmpty();
|
||||
updatedStats.lastToastTimestamp = Date.now();
|
||||
}
|
||||
AggregatedStats.store(updatedStats, name);
|
||||
|
|
|
@ -43,5 +43,8 @@ export async function getServiceIdsForE164s(
|
|||
e164s,
|
||||
acisAndAccessKeys,
|
||||
returnAcisWithoutUaks: false,
|
||||
useLibsignal: window.Signal.RemoteConfig.isEnabled(
|
||||
'desktop.cdsiViaLibsignal'
|
||||
),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue