Media moderation stuff
(https://gitlab.com/famedly/conduit/-/issues/421)
I have already implemented media deletion via MXC (the database key and the file locally from our database) using an admin command, however this does not deal with the thumbnail (you need to know the MXC for that too) and doesn't support bulk MXC deletion yet. A potential idea I have is to support putting an event ID (e.g. from a /report event) and get the media MXC URL and thumbnail MXC URL from those fields in the event ID.
Currently, local and remote media are thrown together in the same pile however a workaround to exclude local media is to check the server name of the MXC and ignore our own. It is unfortunately extra processing power but it's an alternative until I decide to write database migrations and changes. A feature to delete all remote media in the past <#> minutes would be a nice feature if you know bad content was fetched by a client and you just need to get rid of it easily and quickly, but this would rely on filesystem metadata instead of something better like adding a "last time of use" and "initial creation" date in the actual database key value pair (requires db changes). This is safe for remote media since the server will just refetch what was deleted for clients.
If I want to support things like automatic media clean up (e.g. removing unused remote media), delete all media by a user, etc I require database changes and migrations. I've been wanting to keep conduwuit as a full drop in replacement with Conduit but at some point if I want to support more cools things I have to make these changes if Timo doesn't.