synadm icon indicating copy to clipboard operation
synadm copied to clipboard

Accept MXC URIs for syandm media quarantine

Open JacksonChen666 opened this issue 1 year ago • 2 comments

For example: syandm media quarantine mxc://example.com/INSERT_MEDIA_ID_HERE

This would make it much easier than having to split things apart manually and turn the command into synadm media quarantine --media-id INSERT_MEDIA_ID_HERE --server-name example.com which is somewhat more tricky to remember (it's -i for media and -s for server name)

Also apply on all other media commands (where MXC URI makes sense) like unquarantine and... nothing else?

JacksonChen666 avatar Sep 06 '24 16:09 JacksonChen666

definitely a good idea! Been there done that! Just copying the URI from the synadm media list command would be so much easier.

Just wanted to note that for local media you would not require to add --server-name since that is either auto-retrieved or fetched from config.yaml, which leaves you with a slightly simpler command:

synadm media quarantine -i <MEDIA_ID>

Sorry for asking a dumb question, I'm not sure anymore: Can media from remote servers also be quarantined?

JOJ0 avatar Sep 10 '24 08:09 JOJ0

Sorry for asking a dumb question, I'm not sure anymore: Can media from remote servers also be quarantined?

That was what I was about to say: Yes, remote media is applicable

Quarantining media means that it is marked as inaccessible by users. It applies to any local media, and any locally-cached copies of remote media.

(https://element-hq.github.io/synapse/latest/admin_api/media_admin_api.html#quarantine-media)

JacksonChen666 avatar Sep 10 '24 08:09 JacksonChen666

~~Note: Merging commits to main will happen after I test changes (I cannot get Synapse's deps installed on this computer)~~ Tested

JacksonChen666 avatar Jan 21 '25 14:01 JacksonChen666