mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-22 21:54:03 +00:00
deploy: 27223a349c
This commit is contained in:
1 parent
753d567509
commit
ae4780152b
12 files changed
+184
-20
No files matched your search
@@ -227,6 +227,16 @@ is quarantined, Synapse will:</p>
|
||||
<li>Quarantine any existing cached remote media.</li>
|
||||
<li>Quarantine any future remote media.</li>
|
||||
</ul>
|
||||
<h2 id="downloading-quarantined-media"><a class="header" href="#downloading-quarantined-media">Downloading quarantined media</a></h2>
|
||||
<p>Normally, when media is quarantined, it will return a 404 error when downloaded.
|
||||
Admins can bypass this by adding <code>?admin_unsafely_bypass_quarantine=true</code>
|
||||
to the <a href="https://spec.matrix.org/v1.16/client-server-api/#get_matrixclientv1mediadownloadservernamemediaid">normal download URL</a>.</p>
|
||||
<p>Bypassing the quarantine check is not recommended. Media is typically quarantined
|
||||
to prevent harmful content from being served to users, which includes admins. Only
|
||||
set the bypass parameter if you intentionally want to access potentially harmful
|
||||
content.</p>
|
||||
<p>Non-admin users cannot bypass quarantine checks, even when specifying the above
|
||||
query parameter.</p>
|
||||
<h2 id="quarantining-media-by-id"><a class="header" href="#quarantining-media-by-id">Quarantining media by ID</a></h2>
|
||||
<p>This API quarantines a single piece of local or remote media.</p>
|
||||
<p>Request:</p>
|
||||
|
||||
@@ -627,6 +627,41 @@ The parameter <code>logout_devices</code> is optional and defaults to <code>true
|
||||
"admin": true
|
||||
}
|
||||
</code></pre>
|
||||
<h2 id="list-room-memberships-of-a-user"><a class="header" href="#list-room-memberships-of-a-user">List room memberships of a user</a></h2>
|
||||
<p>Gets a list of room memberships for a specific <code>user_id</code>. This
|
||||
endpoint differs from
|
||||
<a href="#list-joined-rooms-of-a-user"><code>GET /_synapse/admin/v1/users/<user_id>/joined_rooms</code></a>
|
||||
in that it returns rooms with memberships other than "join".</p>
|
||||
<p>The API is:</p>
|
||||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/memberships
|
||||
</code></pre>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json"> {
|
||||
"memberships": {
|
||||
"!DuGcnbhHGaSZQoNQR:matrix.org": "join",
|
||||
"!ZtSaPCawyWtxfWiIy:matrix.org": "leave",
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>which is a list of room membership states for the given user. This endpoint can
|
||||
be used with both local and remote users, with the caveat that the homeserver will
|
||||
only be aware of the memberships for rooms that one of its local users has joined.</p>
|
||||
<p>Remote user memberships may also be out of date if all local users have since left
|
||||
a room. The homeserver will thus no longer receive membership updates about it.</p>
|
||||
<p>The list includes rooms that the user has since left; other membership states (knock,
|
||||
invite, etc.) are also possible.</p>
|
||||
<p>Note that rooms will only disappear from this list if they are
|
||||
<a href="./rooms.html#delete-room-api">purged</a> from the homeserver.</p>
|
||||
<p><strong>Parameters</strong></p>
|
||||
<p>The following parameters should be set in the URL:</p>
|
||||
<ul>
|
||||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||||
</ul>
|
||||
<p><strong>Response</strong></p>
|
||||
<p>The following fields are returned in the JSON response body:</p>
|
||||
<ul>
|
||||
<li><code>memberships</code> - A map of <code>room_id</code> (string) to <code>membership</code> state (string).</li>
|
||||
</ul>
|
||||
<h2 id="list-joined-rooms-of-a-user"><a class="header" href="#list-joined-rooms-of-a-user">List joined rooms of a user</a></h2>
|
||||
<p>Gets a list of all <code>room_id</code> that a specific <code>user_id</code> is joined to and is a member of (participating in).</p>
|
||||
<p>The API is:</p>
|
||||
|
||||
Reference in new issue
Block a user