mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 05:36:06 +00:00
Move power level change notices to DEBUG
Fixes https://github.com/matrix-org/mjolnir/issues/32
This commit is contained in:
parent
f7448564be
commit
223464227b
@ -507,25 +507,11 @@ export class Mjolnir {
|
|||||||
// power levels were updated - recheck permissions
|
// power levels were updated - recheck permissions
|
||||||
ErrorCache.resetError(roomId, ERROR_KIND_PERMISSION);
|
ErrorCache.resetError(roomId, ERROR_KIND_PERMISSION);
|
||||||
const url = this.protectedRooms[roomId];
|
const url = this.protectedRooms[roomId];
|
||||||
let html = `Power levels changed in <a href="${url}">${roomId}</a> - checking permissions...`;
|
await logMessage(LogLevel.DEBUG, "Mjolnir", `Power levels changed in ${url} - 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,
|
|
||||||
});
|
|
||||||
const errors = await this.verifyPermissionsIn(roomId);
|
const errors = await this.verifyPermissionsIn(roomId);
|
||||||
const hadErrors = await this.printActionResult(errors);
|
const hadErrors = await this.printActionResult(errors);
|
||||||
if (!hadErrors) {
|
if (!hadErrors) {
|
||||||
html = `<font color="#00cc00">All permissions look OK.</font>`;
|
await logMessage(LogLevel.DEBUG, "Mjolnir", `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,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else if (event['type'] === "m.room.member") {
|
} else if (event['type'] === "m.room.member") {
|
||||||
|
Loading…
Reference in New Issue
Block a user