Remove unused function to auto-rageshake when key backup is not set up (#31942)

This commit is contained in:
Andy Balaam
2026-02-03 12:52:12 +00:00
committed by GitHub
parent af55def428
commit eb909f1090
6 changed files with 1 additions and 68 deletions
-15
View File
@@ -493,8 +493,6 @@ export default class DeviceListener extends TypedEventEmitter<DeviceListenerEven
if (allSystemsReady) {
logSpan.info("No toast needed");
await this.setDeviceState("ok", logSpan);
this.checkKeyBackupStatus();
} else {
// make sure our keys are finished downloading
await crypto.getUserDeviceInfo([cli.getSafeUserId()]);
@@ -549,9 +547,6 @@ export default class DeviceListener extends TypedEventEmitter<DeviceListenerEven
});
await this.setDeviceState("key_storage_out_of_sync", logSpan);
}
if (this.dismissedThisDeviceToast) {
this.checkKeyBackupStatus();
}
}
// This needs to be done after awaiting on getUserDeviceInfo() above, so
@@ -733,16 +728,6 @@ export default class DeviceListener extends TypedEventEmitter<DeviceListenerEven
});
}
/**
* Check if key backup is enabled, and if not, raise an `Action.ReportKeyBackupNotEnabled` event (which will
* trigger an auto-rageshake).
*/
private checkKeyBackupStatus = async (): Promise<void> => {
if (!(await this.isKeyBackupUploadActive(logger))) {
dis.dispatch({ action: Action.ReportKeyBackupNotEnabled });
}
};
/**
* Is key backup enabled? Use a cached answer if we have one.
*/
-6
View File
@@ -229,12 +229,6 @@ export enum Action {
*/
PseudonymousAnalyticsReject = "pseudonymous_analytics_reject",
/**
* Fires after crypto is setup if key backup is not enabled
* Used to trigger auto rageshakes when configured
*/
ReportKeyBackupNotEnabled = "report_key_backup_not_enabled",
/**
* Dispatched after leave room or space is finished
*/
-1
View File
@@ -1508,7 +1508,6 @@
"ask_to_join": "Enable ask to join",
"automatic_debug_logs": "Automatically send debug logs on any error",
"automatic_debug_logs_decryption": "Automatically send debug logs on decryption errors",
"automatic_debug_logs_key_backup": "Automatically send debug logs when key backup is not functioning",
"beta_description": "What's next for %(brand)s? Labs are the best way to get things early, test out new features and help shape them before they actually launch.",
"beta_feature": "This is a beta feature",
"beta_feedback_leave_button": "To leave the beta, visit your settings.",
-6
View File
@@ -352,7 +352,6 @@ export interface Settings {
"developerMode": IBaseSetting<boolean>;
"automaticErrorReporting": IBaseSetting<boolean>;
"automaticDecryptionErrorReporting": IBaseSetting<boolean>;
"automaticKeyBackNotEnabledReporting": IBaseSetting<boolean>;
"debug_scroll_panel": IBaseSetting<boolean>;
"debug_timeline_panel": IBaseSetting<boolean>;
"debug_registration": IBaseSetting<boolean>;
@@ -1320,11 +1319,6 @@ export const SETTINGS: Settings = {
default: false,
controller: new ReloadOnChangeController(),
},
"automaticKeyBackNotEnabledReporting": {
displayName: _td("labs|automatic_debug_logs_key_backup"),
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
default: false,
},
"debug_scroll_panel": {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
default: false,
+1 -17
View File
@@ -24,7 +24,6 @@ import defaultDispatcher from "../dispatcher/dispatcher";
import { AsyncStoreWithClient } from "./AsyncStoreWithClient";
import { type ActionPayload } from "../dispatcher/payloads";
import SettingsStore from "../settings/SettingsStore";
import { Action } from "../dispatcher/actions";
// Minimum interval of 1 minute between reports
const RAGESHAKE_INTERVAL = 60000;
@@ -66,12 +65,7 @@ export default class AutoRageshakeStore extends AsyncStoreWithClient<IState> {
return AutoRageshakeStore.internalInstance;
}
protected async onAction(payload: ActionPayload): Promise<void> {
switch (payload.action) {
case Action.ReportKeyBackupNotEnabled:
this.onReportKeyBackupNotEnabled();
}
}
protected async onAction(_payload: ActionPayload): Promise<void> {}
protected async onReady(): Promise<void> {
if (!SettingsStore.getValue("automaticDecryptionErrorReporting")) return;
@@ -187,16 +181,6 @@ export default class AutoRageshakeStore extends AsyncStoreWithClient<IState> {
);
}
}
private async onReportKeyBackupNotEnabled(): Promise<void> {
if (!SettingsStore.getValue("automaticKeyBackNotEnabledReporting")) return;
await sendBugReport(SdkConfig.get().bug_report_endpoint_url, {
userText: `Auto-reporting key backup not enabled`,
sendLogs: true,
labels: ["web", Action.ReportKeyBackupNotEnabled],
});
}
}
window.mxAutoRageshakeStore = AutoRageshakeStore.instance;