Appease the linter

This commit is contained in:
Travis Ralston 2019-10-23 13:25:32 -06:00
parent f9b3a8cd41
commit 354caa96c0
2 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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']);
}
}
}