MODiX icon indicating copy to clipboard operation
MODiX copied to clipboard

Infraction syncing strategy

Open Scott-Caldwell opened this issue 4 years ago • 0 comments

InfractionSyncingHandler throws an error when audit log data cannot be found. This happens quite frequently, as we receive the ban event from the gateway before the audit log has been created.

Furthermore, in raid situations we may mass-ban many users through Vortex, and in that case the audit log data may be further back (and therefore not pulled, since we only pull the 10 most recent audit logs).

We should come up with an asynchronous strategy for dealing with infraction syncing, as it seems like responding to the event immediately isn't working out.

We could possibly have a background service that runs every X minutes, pulls a ton of audit logs, and creates infractions as necessary. Possibly also on a gateway ban event, we could add the banned user ID to a cache so that the background service knows that it should expect to find audit logs for the cached users. If it doesn't find anything for them, it knows to pull audit logs from even further back. If it still doesn't find anything, we can still log an infraction, just maybe by an "unknown" moderator. Eventually maybe we could even allow staff to go back in and fill in missing moderator information that the bot couldn't find.

Tagging under 2.0, since I think this would be too much effort/design time for 1.0.

Scott-Caldwell avatar Jun 22 '21 14:06 Scott-Caldwell