This commit is contained in:
anoadragon453 2024-10-01 11:19:50 +00:00
parent 6fbec855eb
commit 2910a8252c
7 changed files with 160 additions and 4 deletions

View file

@ -1331,6 +1331,64 @@ for more information.</p>
}
</code></pre>
<p><em>Added in Synapse 1.72.0.</em></p>
<h2 id="redact-all-the-events-of-a-user"><a class="header" href="#redact-all-the-events-of-a-user">Redact all the events of a user</a></h2>
<p>The API is </p>
<pre><code>POST /_synapse/admin/v1/user/$user_id/redact
{
&quot;rooms&quot;: [&quot;!roomid1&quot;, &quot;!roomid2&quot;]
}
</code></pre>
<p>If an empty list is provided as the key for <code>rooms</code>, all events in all the rooms the user is member of will be redacted,
otherwise all the events in the rooms provided in the request will be redacted. </p>
<p>The API starts redaction process running, and returns immediately with a JSON body with
a redact id which can be used to query the status of the redaction process:</p>
<pre><code class="language-json">{
&quot;redact_id&quot;: &quot;&lt;opaque id&gt;&quot;
}
</code></pre>
<p><strong>Parameters</strong></p>
<p>The following parameters should be set in the URL:</p>
<ul>
<li><code>user_id</code> - The fully qualified MXID of the user: for example, <code>@user:server.com</code>.</li>
</ul>
<p>The following JSON body parameter must be provided:</p>
<ul>
<li><code>rooms</code> - A list of rooms to redact the user's events in. If an empty list is provided all events in all rooms
the user is a member of will be redacted</li>
</ul>
<p><em>Added in Synapse 1.116.0.</em></p>
<p>The following JSON body parameters are optional:</p>
<ul>
<li><code>reason</code> - Reason the redaction is being requested, ie &quot;spam&quot;, &quot;abuse&quot;, etc. This will be included in each redaction event, and be visible to users.</li>
<li><code>limit</code> - a limit on the number of the user's events to search for ones that can be redacted (events are redacted newest to oldest) in each room, defaults to 1000 if not provided</li>
</ul>
<h2 id="check-the-status-of-a-redaction-process"><a class="header" href="#check-the-status-of-a-redaction-process">Check the status of a redaction process</a></h2>
<p>It is possible to query the status of the background task for redacting a user's events.
The status can be queried up to 24 hours after completion of the task,
or until Synapse is restarted (whichever happens first).</p>
<p>The API is:</p>
<pre><code>GET /_synapse/admin/v1/user/redact_status/$redact_id
</code></pre>
<p>A response body like the following is returned:</p>
<pre><code>{
&quot;status&quot;: &quot;active&quot;,
&quot;failed_redactions&quot;: [],
}
</code></pre>
<p><strong>Parameters</strong></p>
<p>The following parameters should be set in the URL:</p>
<ul>
<li><code>redact_id</code> - string - The ID for this redaction process, provided when the redaction was requested.</li>
</ul>
<p><strong>Response</strong></p>
<p>The following fields are returned in the JSON response body:</p>
<ul>
<li><code>status</code> - string - one of scheduled/active/completed/failed, indicating the status of the redaction job</li>
<li><code>failed_redactions</code> - dictionary - the keys of the dict are event ids the process was unable to redact, if any, and the values are
the corresponding error that caused the redaction to fail</li>
</ul>
<p><em>Added in Synapse 1.116.0.</em></p>
</main>

View file

@ -1874,7 +1874,7 @@ v1.61.0.</p>
<tr><td>v1.85.0 v1.91.2</td><td>v1.83.0</td></tr>
<tr><td>v1.92.0 v1.97.0</td><td>v1.90.0</td></tr>
<tr><td>v1.98.0 v1.105.0</td><td>v1.96.0</td></tr>
<tr><td>v1.105.1 v1.115.0</td><td>v1.100.0</td></tr>
<tr><td>v1.105.1 v1.116.0</td><td>v1.100.0</td></tr>
</tbody></table>
<h2 id="upgrading-from-a-very-old-version"><a class="header" href="#upgrading-from-a-very-old-version">Upgrading from a very old version</a></h2>
<p>You need to read all of the upgrade notes for each version between your current
@ -4508,6 +4508,15 @@ ownership. Defaults to &quot;[%(server_name)s] Validate your email&quot;</li>
password_reset: &quot;[%(server_name)s] Password reset&quot;
email_validation: &quot;[%(server_name)s] Validate your email&quot;
</code></pre>
<hr />
<h3 id="max_event_delay_duration"><a class="header" href="#max_event_delay_duration"><code>max_event_delay_duration</code></a></h3>
<p>The maximum allowed duration by which sent events can be delayed, as per
<a href="https://github.com/matrix-org/matrix-spec-proposals/pull/4140">MSC4140</a>.
Must be a positive value if set.</p>
<p>Defaults to no duration (<code>null</code>), which disallows sending delayed events.</p>
<p>Example configuration:</p>
<pre><code class="language-yaml">max_event_delay_duration: 24h
</code></pre>
<h2 id="homeserver-blocking"><a class="header" href="#homeserver-blocking">Homeserver blocking</a></h2>
<p>Useful options for Synapse admins.</p>
<hr />
@ -5777,6 +5786,16 @@ Defaults to <code>https://www.recaptcha.net/recaptcha/api/siteverify</code>.</p>
<pre><code class="language-yaml">turn_shared_secret: &quot;YOUR_SHARED_SECRET&quot;
</code></pre>
<hr />
<h3 id="turn_shared_secret_path"><a class="header" href="#turn_shared_secret_path"><code>turn_shared_secret_path</code></a></h3>
<p>An alternative to <a href="usage/configuration/config_documentation.html#turn_shared_secret"><code>turn_shared_secret</code></a>:
allows the shared secret to be specified in an external file.</p>
<p>The file should be a plain text file, containing only the shared secret.
Synapse reads the shared secret from the given file once at startup.</p>
<p>Example configuration:</p>
<pre><code class="language-yaml">turn_shared_secret_path: /path/to/secrets/file
</code></pre>
<p><em>Added in Synapse 1.116.0.</em></p>
<hr />
<h3 id="turn_username-and-turn_password"><a class="header" href="#turn_username-and-turn_password"><code>turn_username</code> and <code>turn_password</code></a></h3>
<p>The Username and password if the TURN server needs them and does not use a token.</p>
<p>Example configuration:</p>
@ -11727,6 +11746,7 @@ information.</p>
</code></pre>
<p>Additionally, the following REST endpoints can be handled for GET requests:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/pushrules/
^/_matrix/client/unstable/org.matrix.msc4140/delayed_events
</code></pre>
<p>Pagination requests can also be handled, but all requests for a given
room must be routed to the same instance. Additionally, care must be taken to
@ -15540,6 +15560,64 @@ for more information.</p>
}
</code></pre>
<p><em>Added in Synapse 1.72.0.</em></p>
<h2 id="redact-all-the-events-of-a-user"><a class="header" href="#redact-all-the-events-of-a-user">Redact all the events of a user</a></h2>
<p>The API is </p>
<pre><code>POST /_synapse/admin/v1/user/$user_id/redact
{
&quot;rooms&quot;: [&quot;!roomid1&quot;, &quot;!roomid2&quot;]
}
</code></pre>
<p>If an empty list is provided as the key for <code>rooms</code>, all events in all the rooms the user is member of will be redacted,
otherwise all the events in the rooms provided in the request will be redacted. </p>
<p>The API starts redaction process running, and returns immediately with a JSON body with
a redact id which can be used to query the status of the redaction process:</p>
<pre><code class="language-json">{
&quot;redact_id&quot;: &quot;&lt;opaque id&gt;&quot;
}
</code></pre>
<p><strong>Parameters</strong></p>
<p>The following parameters should be set in the URL:</p>
<ul>
<li><code>user_id</code> - The fully qualified MXID of the user: for example, <code>@user:server.com</code>.</li>
</ul>
<p>The following JSON body parameter must be provided:</p>
<ul>
<li><code>rooms</code> - A list of rooms to redact the user's events in. If an empty list is provided all events in all rooms
the user is a member of will be redacted</li>
</ul>
<p><em>Added in Synapse 1.116.0.</em></p>
<p>The following JSON body parameters are optional:</p>
<ul>
<li><code>reason</code> - Reason the redaction is being requested, ie &quot;spam&quot;, &quot;abuse&quot;, etc. This will be included in each redaction event, and be visible to users.</li>
<li><code>limit</code> - a limit on the number of the user's events to search for ones that can be redacted (events are redacted newest to oldest) in each room, defaults to 1000 if not provided</li>
</ul>
<h2 id="check-the-status-of-a-redaction-process"><a class="header" href="#check-the-status-of-a-redaction-process">Check the status of a redaction process</a></h2>
<p>It is possible to query the status of the background task for redacting a user's events.
The status can be queried up to 24 hours after completion of the task,
or until Synapse is restarted (whichever happens first).</p>
<p>The API is:</p>
<pre><code>GET /_synapse/admin/v1/user/redact_status/$redact_id
</code></pre>
<p>A response body like the following is returned:</p>
<pre><code>{
&quot;status&quot;: &quot;active&quot;,
&quot;failed_redactions&quot;: [],
}
</code></pre>
<p><strong>Parameters</strong></p>
<p>The following parameters should be set in the URL:</p>
<ul>
<li><code>redact_id</code> - string - The ID for this redaction process, provided when the redaction was requested.</li>
</ul>
<p><strong>Response</strong></p>
<p>The following fields are returned in the JSON response body:</p>
<ul>
<li><code>status</code> - string - one of scheduled/active/completed/failed, indicating the status of the redaction job</li>
<li><code>failed_redactions</code> - dictionary - the keys of the dict are event ids the process was unable to redact, if any, and the values are
the corresponding error that caused the redaction to fail</li>
</ul>
<p><em>Added in Synapse 1.116.0.</em></p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="version-api"><a class="header" href="#version-api">Version API</a></h1>
<p>This API returns the running Synapse version.
This is useful when a Synapse instance

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -267,7 +267,7 @@ v1.61.0.</p>
<tr><td>v1.85.0 v1.91.2</td><td>v1.83.0</td></tr>
<tr><td>v1.92.0 v1.97.0</td><td>v1.90.0</td></tr>
<tr><td>v1.98.0 v1.105.0</td><td>v1.96.0</td></tr>
<tr><td>v1.105.1 v1.115.0</td><td>v1.100.0</td></tr>
<tr><td>v1.105.1 v1.116.0</td><td>v1.100.0</td></tr>
</tbody></table>
<h2 id="upgrading-from-a-very-old-version"><a class="header" href="#upgrading-from-a-very-old-version">Upgrading from a very old version</a></h2>
<p>You need to read all of the upgrade notes for each version between your current

View file

@ -848,6 +848,15 @@ ownership. Defaults to &quot;[%(server_name)s] Validate your email&quot;</li>
password_reset: &quot;[%(server_name)s] Password reset&quot;
email_validation: &quot;[%(server_name)s] Validate your email&quot;
</code></pre>
<hr />
<h3 id="max_event_delay_duration"><a class="header" href="#max_event_delay_duration"><code>max_event_delay_duration</code></a></h3>
<p>The maximum allowed duration by which sent events can be delayed, as per
<a href="https://github.com/matrix-org/matrix-spec-proposals/pull/4140">MSC4140</a>.
Must be a positive value if set.</p>
<p>Defaults to no duration (<code>null</code>), which disallows sending delayed events.</p>
<p>Example configuration:</p>
<pre><code class="language-yaml">max_event_delay_duration: 24h
</code></pre>
<h2 id="homeserver-blocking"><a class="header" href="#homeserver-blocking">Homeserver blocking</a></h2>
<p>Useful options for Synapse admins.</p>
<hr />
@ -2117,6 +2126,16 @@ Defaults to <code>https://www.recaptcha.net/recaptcha/api/siteverify</code>.</p>
<pre><code class="language-yaml">turn_shared_secret: &quot;YOUR_SHARED_SECRET&quot;
</code></pre>
<hr />
<h3 id="turn_shared_secret_path"><a class="header" href="#turn_shared_secret_path"><code>turn_shared_secret_path</code></a></h3>
<p>An alternative to <a href="#turn_shared_secret"><code>turn_shared_secret</code></a>:
allows the shared secret to be specified in an external file.</p>
<p>The file should be a plain text file, containing only the shared secret.
Synapse reads the shared secret from the given file once at startup.</p>
<p>Example configuration:</p>
<pre><code class="language-yaml">turn_shared_secret_path: /path/to/secrets/file
</code></pre>
<p><em>Added in Synapse 1.116.0.</em></p>
<hr />
<h3 id="turn_username-and-turn_password"><a class="header" href="#turn_username-and-turn_password"><code>turn_username</code> and <code>turn_password</code></a></h3>
<p>The Username and password if the TURN server needs them and does not use a token.</p>
<p>Example configuration:</p>

View file

@ -420,6 +420,7 @@ information.</p>
</code></pre>
<p>Additionally, the following REST endpoints can be handled for GET requests:</p>
<pre><code>^/_matrix/client/(api/v1|r0|v3|unstable)/pushrules/
^/_matrix/client/unstable/org.matrix.msc4140/delayed_events
</code></pre>
<p>Pagination requests can also be handled, but all requests for a given
room must be routed to the same instance. Additionally, care must be taken to