FabricMC / kotlin-fabric-discord-bot

The discord bot previously used in the fabric discord server.
MIT License
5 stars 7 forks source link

Rotating action logs #13

Closed gdude2002 closed 3 years ago

gdude2002 commented 3 years ago

I had planned on looking into this on a later date, but some concerns were raised with me in private so I'm going to enumerate it now.

We don't need to keep action logs permanently. I think 30 days is plenty, and had considered deleting messages monthly, but there are some issues with that:

Instead, I'd like to propose the following solution:

I think this is a relatively simple solution that retains action logs as long as we need them for (35 days), whilst stil respecting users' expectation of privacy (messages are always eventually removed if users delete/edit them). That said, I'd be happy to take constructive feedback in the comments of this issue.


Things that have been considered and decided against:

jamierocks commented 3 years ago

Why not just keep the logs forever, or for so long as you legally can (not sure on the GDPR implications of doing this)?

Per-user opt-out: We simply can't trust users with this. Most users don't really care enough, and many people that decide to opt-out are likely to turn out to be troublemakers, even if there are people that behave themselves and would like to opt-out.

Are there no GDPR concerns on this?

gdude2002 commented 3 years ago

GDPR isn't relevant as we don't exfil any data - everything is kept on Discord. You could say there's an argument for us removing user profile info from them if a user deletes their account, though.

To answer the GDPR question though, the cutoff is around 30 days. That said, it's not applicable to what we're doing.

Minenash commented 3 years ago

Discord won't let you bulk-delete messages older than 2 weeks, which is not enough retention time

What do you mean by bulk-delete? Is it a specific api thing or is describing mass individual deletion of messages? I ask, because if it allows you to delete messages individually, then every week you could have the bot loop through all the messages in the channel, and if it's over 30 days old, delete it. If the thing you get back when you request a list of messages is sorted by date, then you could also stop the loop once you reached under 30 days. It wouldn't require any database work.

2xsaiko commented 3 years ago

Discord won't let you bulk-delete messages older than 2 weeks, which is not enough retention time

What do you mean by bulk-delete? Is it a specific api thing or is describing mass individual deletion of messages? I ask, because if it allows you to delete messages individually, then every week you could have the bot loop through all the messages in the channel, and if it's over 30 days old, delete it. If the thing you get back when you request a list of messages is sorted by date, then you could also stop the loop once you reached under 30 days. It wouldn't require any database work.

Yes, bulk delete is an API call. Not sure what the problem is with using the single delete call for older messages though, I did the same in my own discord bot.

gdude2002 commented 3 years ago

I mostly want to avoid doing that because it's pretty slow and inefficient, and there are a lot of action log messages on a server with 10,000 people in it so the bot would end up getting rate limited quickly and be unable to delete other messages on the server

gdude2002 commented 3 years ago

This has been fully implemented and is now running in production.