Skip to content

Commit 8f9ff9f

Browse files
committed
Disable a lot of it
1 parent 9b5f1e8 commit 8f9ff9f

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/protections/ProtectionManager.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ export class ProtectionManager {
7272
*/
7373
public async start() {
7474
this.mjolnir.reportManager.on("report.new", this.handleReport.bind(this));
75-
this.mjolnir.matrixEmitter.on("room.event", (...args) => this.handleEvent(...args));
75+
// Commented out for September 2nd, 2025 database incident
76+
// this.mjolnir.matrixEmitter.on("room.event", (...args) => this.handleEvent(...args));
7677
for (const protection of PROTECTIONS) {
7778
try {
7879
await this.registerProtection(protection);
@@ -187,8 +188,9 @@ export class ProtectionManager {
187188
* Make a list of the names of enabled protections and save them in a state event
188189
*/
189190
private async saveEnabledProtections() {
190-
const protections = this.enabledProtections.map((p) => p.name);
191-
await this.mjolnir.client.setAccountData(ENABLED_PROTECTIONS_EVENT_TYPE, { enabled: protections });
191+
// Commented out for September 2nd, 2025 database incident
192+
// const protections = this.enabledProtections.map((p) => p.name);
193+
// await this.mjolnir.client.setAccountData(ENABLED_PROTECTIONS_EVENT_TYPE, { enabled: protections });
192194
}
193195
/*
194196
* Enable a protection by name and persist its enable state in to a state event
@@ -200,11 +202,12 @@ export class ProtectionManager {
200202
if (protection === undefined) {
201203
return;
202204
}
203-
protection.enabled = true;
204-
await this.saveEnabledProtections();
205-
for (let roomId of this.mjolnir.protectedRoomsTracker.getProtectedRooms()) {
206-
await protection.startProtectingRoom(this.mjolnir, roomId);
207-
}
205+
// Commented out for September 2nd, 2025 database incident
206+
// protection.enabled = true;
207+
// await this.saveEnabledProtections();
208+
// for (let roomId of this.mjolnir.protectedRoomsTracker.getProtectedRooms()) {
209+
// await protection.startProtectingRoom(this.mjolnir, roomId);
210+
// }
208211
}
209212

210213
public get enabledProtections(): Protection[] {

0 commit comments

Comments
 (0)