mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-21 15:25:22 +03:00
adjust 'redact all user events on remove' to the new API
This commit is contained in:
parent
46cc0e2fda
commit
470f1b5455
1 changed files with 4 additions and 4 deletions
|
@ -825,8 +825,8 @@ const dataProvider = withLifecycleCallbacks(baseDataProvider, [
|
|||
|
||||
if (params.meta?.redactEvents) {
|
||||
const base_url = storage.getItem("base_url");
|
||||
const endpoint_url = `${base_url}/_synapse/admin/v1/users/${encodeURIComponent(returnMXID(params.id))}/redact`;
|
||||
await jsonClient(endpoint_url, { method: "POST" });
|
||||
const endpoint_url = `${base_url}/_synapse/admin/v1/user/${encodeURIComponent(returnMXID(params.id))}/redact`;
|
||||
await jsonClient(endpoint_url, { method: "POST", body: JSON.stringify({ rooms: [] }) });
|
||||
}
|
||||
|
||||
return params;
|
||||
|
@ -842,8 +842,8 @@ const dataProvider = withLifecycleCallbacks(baseDataProvider, [
|
|||
|
||||
if (params.meta?.redactEvents) {
|
||||
const base_url = storage.getItem("base_url");
|
||||
const endpoint_url = `${base_url}/_synapse/admin/v1/users/${encodeURIComponent(returnMXID(id))}/redact`;
|
||||
await jsonClient(endpoint_url, { method: "POST" });
|
||||
const endpoint_url = `${base_url}/_synapse/admin/v1/user/${encodeURIComponent(returnMXID(id))}/redact`;
|
||||
await jsonClient(endpoint_url, { method: "POST", body: JSON.stringify({ rooms: [] }) });
|
||||
}
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue