mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Appease the linter
This commit is contained in:
parent
f9b3a8cd41
commit
354caa96c0
@ -24,10 +24,10 @@ export async function execImportCommand(roomId: string, event: any, mjolnir: Mjo
|
||||
const importRoomId = await mjolnir.client.resolveRoom(parts[2]);
|
||||
const list = mjolnir.lists.find(b => b.listShortcode === parts[3]);
|
||||
if (!list) {
|
||||
const message = "Unable to find list - check your shortcode.";
|
||||
const reply = RichReply.createFor(roomId, event, message, message);
|
||||
reply["msgtype"] = "m.notice";
|
||||
return mjolnir.client.sendMessage(roomId, reply);
|
||||
const errMessage = "Unable to find list - check your shortcode.";
|
||||
const errReply = RichReply.createFor(roomId, event, errMessage, errMessage);
|
||||
errReply["msgtype"] = "m.notice";
|
||||
return mjolnir.client.sendMessage(roomId, errReply);
|
||||
}
|
||||
|
||||
let importedRules = 0;
|
||||
|
@ -33,12 +33,12 @@ export async function execRedactCommand(roomId: string, event: any, mjolnir: Mjo
|
||||
}
|
||||
|
||||
const eventsToRedact = await getMessagesByUserSinceLastJoin(mjolnir.client, userId, targetRoomId);
|
||||
for (const event of eventsToRedact) {
|
||||
for (const victimEvent of eventsToRedact) {
|
||||
if (config.verboseLogging) {
|
||||
await mjolnir.client.sendNotice(mjolnir.managementRoomId, `Redacting ${event['event_id']} in ${targetRoomId}`);
|
||||
await mjolnir.client.sendNotice(mjolnir.managementRoomId, `Redacting ${victimEvent['event_id']} in ${targetRoomId}`);
|
||||
}
|
||||
if (!config.noop) {
|
||||
await mjolnir.client.redactEvent(targetRoomId, event['event_id']);
|
||||
await mjolnir.client.redactEvent(targetRoomId, victimEvent['event_id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user