From 223464227b8ab29cf11fbc06da7099545088bfa9 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 12 Feb 2020 15:42:10 -0700 Subject: [PATCH] Move power level change notices to DEBUG Fixes https://github.com/matrix-org/mjolnir/issues/32 --- src/Mjolnir.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/Mjolnir.ts b/src/Mjolnir.ts index d172ec3..c478a18 100644 --- a/src/Mjolnir.ts +++ b/src/Mjolnir.ts @@ -507,25 +507,11 @@ export class Mjolnir { // power levels were updated - recheck permissions ErrorCache.resetError(roomId, ERROR_KIND_PERMISSION); const url = this.protectedRooms[roomId]; - let html = `Power levels changed in ${roomId} - checking permissions...`; - let text = `Power levels changed in ${url} - checking permissions...`; - await this.client.sendMessage(config.managementRoom, { - msgtype: "m.notice", - body: text, - format: "org.matrix.custom.html", - formatted_body: html, - }); + await logMessage(LogLevel.DEBUG, "Mjolnir", `Power levels changed in ${url} - checking permissions...`); const errors = await this.verifyPermissionsIn(roomId); const hadErrors = await this.printActionResult(errors); if (!hadErrors) { - html = `All permissions look OK.`; - text = "All permissions look OK."; - await this.client.sendMessage(config.managementRoom, { - msgtype: "m.notice", - body: text, - format: "org.matrix.custom.html", - formatted_body: html, - }); + await logMessage(LogLevel.DEBUG, "Mjolnir", `All permissions look OK.`); } return; } else if (event['type'] === "m.room.member") {