mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Automatically sync the ban lists after issuing a ban
Workaround for https://github.com/matrix-org/mjolnir/issues/13. Fixes https://github.com/matrix-org/mjolnir/issues/13
This commit is contained in:
parent
1b795c7b17
commit
3be2da5c47
@ -119,6 +119,10 @@ export async function execBanCommand(roomId: string, event: any, mjolnir: Mjolni
|
|||||||
|
|
||||||
await mjolnir.client.sendStateEvent(bits.list.roomId, bits.ruleType, stateKey, ruleContent);
|
await mjolnir.client.sendStateEvent(bits.list.roomId, bits.ruleType, stateKey, ruleContent);
|
||||||
await mjolnir.client.unstableApis.addReactionToEvent(roomId, event['event_id'], '✅');
|
await mjolnir.client.unstableApis.addReactionToEvent(roomId, event['event_id'], '✅');
|
||||||
|
|
||||||
|
// Just sync the lists to apply the ban as it might not always come down /sync for some reason
|
||||||
|
await logMessage(LogLevel.DEBUG, "UnbanBanCommand", `Syncing lists to ensure the ban is applied`);
|
||||||
|
await mjolnir.syncLists(config.verboseLogging);
|
||||||
}
|
}
|
||||||
|
|
||||||
// !mjolnir unban <shortcode> <user|server|room> <glob> [apply:t/f]
|
// !mjolnir unban <shortcode> <user|server|room> <glob> [apply:t/f]
|
||||||
|
Loading…
Reference in New Issue
Block a user