Add buttons to protect and unprotect users' media from quarantine (#150)

This commit is contained in:
Dirk Klimpel
2021-08-19 11:51:07 +02:00
committed by GitHub
parent 32e088ac5a
commit e6f01f035b
5 changed files with 133 additions and 5 deletions

View File

@@ -182,6 +182,17 @@ const resourceMap = {
method: "POST",
}),
},
protect_media: {
map: pm => ({ id: pm.media_id }),
create: params => ({
endpoint: `/_synapse/admin/v1/media/protect/${params.media_id}`,
method: "POST",
}),
delete: params => ({
endpoint: `/_synapse/admin/v1/media/unprotect/${params.media_id}`,
method: "POST",
}),
},
servernotices: {
map: n => ({ id: n.event_id }),
create: data => ({