Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes

This commit is contained in:
Richard van der Hoff 2020-10-01 11:22:36 +01:00
commit db13a8607e
392 changed files with 7424 additions and 2453 deletions

Binary file not shown.

View file

@ -1,3 +1,30 @@
Synapse 1.20.1 (2020-09-24)
===========================
Bugfixes
--------
- Fix a bug introduced in v1.20.0 which caused the `synapse_port_db` script to fail. ([\#8386](https://github.com/matrix-org/synapse/issues/8386))
- Fix a bug introduced in v1.20.0 which caused variables to be incorrectly escaped in Jinja2 templates. ([\#8394](https://github.com/matrix-org/synapse/issues/8394))
Synapse 1.20.0 (2020-09-22)
===========================
No significant changes since v1.20.0rc5.
Removal warning
---------------
Historically, the [Synapse Admin
API](https://github.com/matrix-org/synapse/tree/master/docs) has been
accessible under the `/_matrix/client/api/v1/admin`,
`/_matrix/client/unstable/admin`, `/_matrix/client/r0/admin` and
`/_synapse/admin` prefixes. In a future release, we will be dropping support
for accessing Synapse's Admin API using the `/_matrix/client/*` prefixes. This
makes it easier for homeserver admins to lock down external access to the Admin
API endpoints.
Synapse 1.20.0rc5 (2020-09-18)
==============================

View file

@ -17,9 +17,9 @@ https://help.github.com/articles/using-pull-requests/) to ask us to pull your
changes into our repo.
Some other points to follow:
* Please base your changes on the `develop` branch.
* Please follow the [code style requirements](#code-style).
* Please include a [changelog entry](#changelog) with each PR.
@ -46,7 +46,7 @@ locally. You'll need python 3.6 or later, and to install a number of tools:
```
# Install the dependencies
pip install -U black flake8 flake8-comprehensions isort
pip install -e ".[lint]"
# Run the linter script
./scripts-dev/lint.sh

View file

@ -75,6 +75,59 @@ for example:
wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
Upgrading to v1.21.0
====================
Forwarding ``/_synapse/client`` through your reverse proxy
----------------------------------------------------------
The `reverse proxy documentation
<https://github.com/matrix-org/synapse/blob/develop/docs/reverse_proxy.md>`_ has been updated
to include reverse proxy directives for ``/_synapse/client/*`` endpoints. As the user password
reset flow now uses endpoints under this prefix, **you must update your reverse proxy
configurations for user password reset to work**.
Additionally, note that the `Synapse worker documentation
<https://github.com/matrix-org/synapse/blob/develop/docs/workers.md>`_ has been updated to
state that the ``/_synapse/client/password_reset/email/submit_token`` endpoint can be handled
by all workers. If you make use of Synapse's worker feature, please update your reverse proxy
configuration to reflect this change.
New HTML templates
------------------
A new HTML template,
`password_reset_confirmation.html <https://github.com/matrix-org/synapse/blob/develop/synapse/res/templates/password_reset_confirmation.html>`_,
has been added to the ``synapse/res/templates`` directory. If you are using a
custom template directory, you may want to copy the template over and modify it.
Note that as of v1.20.0, templates do not need to be included in custom template
directories for Synapse to start. The default templates will be used if a custom
template cannot be found.
This page will appear to the user after clicking a password reset link that has
been emailed to them.
To complete password reset, the page must include a way to make a `POST`
request to
``/_synapse/client/password_reset/{medium}/submit_token``
with the query parameters from the original link, presented as a URL-encoded form. See the file
itself for more details.
Updated Single Sign-on HTML Templates
-------------------------------------
The ``saml_error.html`` template was removed from Synapse and replaced with the
``sso_error.html`` template. If your Synapse is configured to use SAML and a
custom ``sso_redirect_confirm_template_dir`` configuration then any customisations
of the ``saml_error.html`` template will need to be merged into the ``sso_error.html``
template. These templates are similar, but the parameters are slightly different:
* The ``msg`` parameter should be renamed to ``error_description``.
* There is no longer a ``code`` parameter for the response code.
* A string ``error`` parameter is available that includes a short hint of why a
user is seeing the error page.
Upgrading to v1.18.0
====================

1
changelog.d/7124.bugfix Normal file
View file

@ -0,0 +1 @@
Fix a bug in the media repository where remote thumbnails with the same size but different crop methods would overwrite each other. Contributed by @deepbluev7.

1
changelog.d/7796.bugfix Normal file
View file

@ -0,0 +1 @@
Fix inconsistent handling of non-existent push rules, and stop tracking the `enabled` state of removed push rules.

1
changelog.d/7905.bugfix Normal file
View file

@ -0,0 +1 @@
Fix a longstanding bug when storing a media file with an empty `upload_name`.

1
changelog.d/8004.feature Normal file
View file

@ -0,0 +1 @@
Require the user to confirm that their password should be reset after clicking the email confirmation link.

1
changelog.d/8208.misc Normal file
View file

@ -0,0 +1 @@
Fix tests on distros which disable TLSv1.0. Contributed by @danc86.

1
changelog.d/8216.misc Normal file
View file

@ -0,0 +1 @@
Simplify the distributor code to avoid unnecessary work.

1
changelog.d/8217.feature Normal file
View file

@ -0,0 +1 @@
Add an admin API `GET /_synapse/admin/v1/event_reports` to read entries of table `event_reports`. Contributed by @dklimpel.

1
changelog.d/8227.doc Normal file
View file

@ -0,0 +1 @@
Add `/_synapse/client` to the reverse proxy documentation.

1
changelog.d/8230.bugfix Normal file
View file

@ -0,0 +1 @@
Fix messages over federation being lost until an event is sent into the same room.

1
changelog.d/8236.bugfix Normal file
View file

@ -0,0 +1 @@
Fix a longstanding bug where files that could not be thumbnailed would result in an Internal Server Error.

1
changelog.d/8243.misc Normal file
View file

@ -0,0 +1 @@
Remove the 'populate_stats_process_rooms_2' background job and restore functionality to 'populate_stats_process_rooms'.

1
changelog.d/8247.bugfix Normal file
View file

@ -0,0 +1 @@
Fix messages over federation being lost until an event is sent into the same room.

1
changelog.d/8248.feature Normal file
View file

@ -0,0 +1 @@
Consolidate the SSO error template across all configuration.

1
changelog.d/8250.misc Normal file
View file

@ -0,0 +1 @@
Clean up type hints for `PaginationConfig`.

1
changelog.d/8256.misc Normal file
View file

@ -0,0 +1 @@
Track the latest event for every destination and room for catch-up after federation outage.

1
changelog.d/8257.misc Normal file
View file

@ -0,0 +1 @@
Fix non-user visible bug in implementation of `MultiWriterIdGenerator.get_current_token_for_writer`.

1
changelog.d/8258.bugfix Normal file
View file

@ -0,0 +1 @@
Fix messages over federation being lost until an event is sent into the same room.

1
changelog.d/8259.misc Normal file
View file

@ -0,0 +1 @@
Switch to the JSON implementation from the standard library.

1
changelog.d/8260.misc Normal file
View file

@ -0,0 +1 @@
Add type hints to `synapse.util.async_helpers`.

1
changelog.d/8261.misc Normal file
View file

@ -0,0 +1 @@
Simplify tests that mock asynchronous functions.

1
changelog.d/8262.bugfix Normal file
View file

@ -0,0 +1 @@
Upgrade canonicaljson to version 1.4.0 to fix an unicode encoding issue.

1
changelog.d/8265.bugfix Normal file
View file

@ -0,0 +1 @@
Fix logstanding bug which could lead to incomplete database upgrades on SQLite.

1
changelog.d/8268.bugfix Normal file
View file

@ -0,0 +1 @@
Fix stack overflow when stderr is redirected to the logging system, and the logging system encounters an error.

1
changelog.d/8272.bugfix Normal file
View file

@ -0,0 +1 @@
Fix messages over federation being lost until an event is sent into the same room.

1
changelog.d/8275.feature Normal file
View file

@ -0,0 +1 @@
Add a config option to specify a whitelist of domains that a user can be redirected to after validating their email or phone number.

1
changelog.d/8278.bugfix Normal file
View file

@ -0,0 +1 @@
Fix a bug which cause the logging system to report errors, if `DEBUG` was enabled and no `context` filter was applied.

1
changelog.d/8279.misc Normal file
View file

@ -0,0 +1 @@
Add type hints to `StreamToken` and `RoomStreamToken` classes.

1
changelog.d/8281.misc Normal file
View file

@ -0,0 +1 @@
Change `StreamToken.room_key` to be a `RoomStreamToken` instance.

1
changelog.d/8282.misc Normal file
View file

@ -0,0 +1 @@
Clean up type hints for `PaginationConfig`.

1
changelog.d/8287.bugfix Normal file
View file

@ -0,0 +1 @@
Fix edge case where push could get delayed for a user until a later event was pushed.

1
changelog.d/8288.misc Normal file
View file

@ -0,0 +1 @@
Refactor notifier code to correctly use the max event stream position.

1
changelog.d/8294.feature Normal file
View file

@ -0,0 +1 @@
Add experimental support for sharding event persister.

1
changelog.d/8296.misc Normal file
View file

@ -0,0 +1 @@
Use slotted classes where possible.

1
changelog.d/8305.feature Normal file
View file

@ -0,0 +1 @@
Add the room topic and avatar to the room details admin API.

1
changelog.d/8306.feature Normal file
View file

@ -0,0 +1 @@
Add an admin API for querying rooms where a user is a member. Contributed by @dklimpel.

1
changelog.d/8317.feature Normal file
View file

@ -0,0 +1 @@
Support testing the local Synapse checkout against the [Complement homeserver test suite](https://github.com/matrix-org/complement/).

1
changelog.d/8320.feature Normal file
View file

@ -0,0 +1 @@
Add `uk.half-shot.msc2778.login.application_service` login type to allow appservices to login.

1
changelog.d/8322.bugfix Normal file
View file

@ -0,0 +1 @@
Fix messages over federation being lost until an event is sent into the same room.

1
changelog.d/8324.bugfix Normal file
View file

@ -0,0 +1 @@
Fix fetching events from remote servers that are malformed.

1
changelog.d/8326.misc Normal file
View file

@ -0,0 +1 @@
Update outdated usages of `metaclass` to python 3 syntax.

1
changelog.d/8329.bugfix Normal file
View file

@ -0,0 +1 @@
Fix UnboundLocalError from occuring when appservices send malformed register request.

1
changelog.d/8330.misc Normal file
View file

@ -0,0 +1 @@
Move lint-related dependencies to package-extra field, update CONTRIBUTING.md to utilise this.

1
changelog.d/8331.misc Normal file
View file

@ -0,0 +1 @@
Use the `admin_patterns` helper in additional locations.

1
changelog.d/8335.misc Normal file
View file

@ -0,0 +1 @@
Fix test logging to allow braces in log output.

1
changelog.d/8337.misc Normal file
View file

@ -0,0 +1 @@
Remove `__future__` imports related to Python 2 compatibility.

1
changelog.d/8344.misc Normal file
View file

@ -0,0 +1 @@
Simplify `super()` calls to Python 3 syntax.

1
changelog.d/8345.feature Normal file
View file

@ -0,0 +1 @@
Add a configuration option that allows existing users to log in with OpenID Connect. Contributed by @BBBSnowball and @OmmyZhang.

1
changelog.d/8353.bugfix Normal file
View file

@ -0,0 +1 @@
Don't send push notifications to expired user accounts.

1
changelog.d/8354.misc Normal file
View file

@ -0,0 +1 @@
Fix bad merge from `release-v1.20.0` branch to `develop`.

1
changelog.d/8362.bugfix Normal file
View file

@ -0,0 +1 @@
Fixed a regression in v1.19.0 with reactivating users through the admin API.

2
changelog.d/8364.bugfix Normal file
View file

@ -0,0 +1,2 @@
Fix a bug where during device registration the length of the device name wasn't
limited.

1
changelog.d/8370.misc Normal file
View file

@ -0,0 +1 @@
Factor out a `_send_dummy_event_for_room` method.

1
changelog.d/8371.misc Normal file
View file

@ -0,0 +1 @@
Improve logging of state resolution.

1
changelog.d/8372.misc Normal file
View file

@ -0,0 +1 @@
Add type annotations to `SimpleHttpClient`.

1
changelog.d/8373.bugfix Normal file
View file

@ -0,0 +1 @@
Include `guest_access` in the fields that are checked for null bytes when updating `room_stats_state`. Broke in v1.7.2.

1
changelog.d/8374.bugfix Normal file
View file

@ -0,0 +1 @@
Fix theoretical race condition where events are not sent down `/sync` if the synchrotron worker is restarted without restarting other workers.

1
changelog.d/8375.doc Normal file
View file

@ -0,0 +1 @@
Add note to the reverse proxy settings documentation about disabling Apache's mod_security2. Contributed by Julian Fietkau (@jfietkau).

1
changelog.d/8377.misc Normal file
View file

@ -0,0 +1 @@
Move lint-related dependencies to package-extra field, update CONTRIBUTING.md to utilise this.

1
changelog.d/8383.misc Normal file
View file

@ -0,0 +1 @@
Refactor ID generators to use `async with` syntax.

1
changelog.d/8385.bugfix Normal file
View file

@ -0,0 +1 @@
Fix a bug which could cause errors in rooms with malformed membership events, on servers using sqlite.

1
changelog.d/8386.bugfix Normal file
View file

@ -0,0 +1 @@
Fix a bug introduced in v1.20.0 which caused the `synapse_port_db` script to fail.

1
changelog.d/8387.feature Normal file
View file

@ -0,0 +1 @@
Add experimental support for sharding event persister.

1
changelog.d/8388.misc Normal file
View file

@ -0,0 +1 @@
Add `EventStreamPosition` type.

1
changelog.d/8396.feature Normal file
View file

@ -0,0 +1 @@
Add experimental support for sharding event persister.

1
changelog.d/8398.bugfix Normal file
View file

@ -0,0 +1 @@
Fix "Re-starting finished log context" warning when receiving an event we already had over federation.

1
changelog.d/8399.misc Normal file
View file

@ -0,0 +1 @@
Create a mechanism for marking tests "logcontext clean".

1
changelog.d/8400.bugfix Normal file
View file

@ -0,0 +1 @@
Fix incorrect handling of timeouts on outgoing HTTP requests.

1
changelog.d/8401.misc Normal file
View file

@ -0,0 +1 @@
A pair of tiny cleanups in the federation request code.

1
changelog.d/8402.misc Normal file
View file

@ -0,0 +1 @@
Add checks on startup that PostgreSQL sequences are consistent with their associated tables.

1
changelog.d/8404.misc Normal file
View file

@ -0,0 +1 @@
Do not include appservice users when calculating the total MAU for a server.

1
changelog.d/8405.feature Normal file
View file

@ -0,0 +1 @@
Consolidate the SSO error template across all configuration.

1
changelog.d/8406.feature Normal file
View file

@ -0,0 +1 @@
Add prometheus metrics for replication requests.

1
changelog.d/8410.bugfix Normal file
View file

@ -0,0 +1 @@
Fix a v1.20.0 regression in the `synapse_port_db` script regarding the `ui_auth_sessions_ips` table.

1
changelog.d/8413.feature Normal file
View file

@ -0,0 +1 @@
Support passing additional single sign-on parameters to the client.

1
changelog.d/8414.bugfix Normal file
View file

@ -0,0 +1 @@
Remove unnecessary 3PID registration check when resetting password via an email address. Bug introduced in v0.34.0rc2.

1
changelog.d/8415.doc Normal file
View file

@ -0,0 +1 @@
Improve description of `server_name` config option in `homserver.yaml`.

1
changelog.d/8417.feature Normal file
View file

@ -0,0 +1 @@
Add a config option to specify a whitelist of domains that a user can be redirected to after validating their email or phone number.

1
changelog.d/8419.feature Normal file
View file

@ -0,0 +1 @@
Add experimental support for sharding event persister.

1
changelog.d/8420.feature Normal file
View file

@ -0,0 +1 @@
Add experimental reporting of metrics on expensive rooms for state-resolution.

1
changelog.d/8422.misc Normal file
View file

@ -0,0 +1 @@
Typing fixes for `synapse.handlers.federation`.

1
changelog.d/8423.misc Normal file
View file

@ -0,0 +1 @@
Various refactors to simplify stream token handling.

1
changelog.d/8425.feature Normal file
View file

@ -0,0 +1 @@
Add experimental prometheus metric to track numbers of "large" rooms for state resolutiom.

1
changelog.d/8426.removal Normal file
View file

@ -0,0 +1 @@
Drop support for `prometheus_client` older than 0.4.0.

1
changelog.d/8427.misc Normal file
View file

@ -0,0 +1 @@
Make stream token serializing/deserializing async.

1
changelog.d/8430.feature Normal file
View file

@ -0,0 +1 @@
Add prometheus metrics to track federation delays.

View file

@ -15,8 +15,6 @@
# limitations under the License.
""" Starts a synapse client console. """
from __future__ import print_function
import argparse
import cmd
import getpass

View file

@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
import json
import urllib
from pprint import pformat

View file

@ -1,5 +1,3 @@
from __future__ import print_function
import argparse
import cgi
import datetime

View file

@ -1,5 +1,3 @@
from __future__ import print_function
import argparse
import cgi
import datetime

View file

@ -10,8 +10,6 @@ the bridge.
Requires:
npm install jquery jsdom
"""
from __future__ import print_function
import json
import subprocess
import time

View file

@ -1,5 +1,4 @@
#!/usr/bin/env python
from __future__ import print_function
import json
import sys
@ -8,11 +7,6 @@ from argparse import ArgumentParser
import requests
try:
raw_input
except NameError: # Python 3
raw_input = input
def _mkurl(template, kws):
for key in kws:
@ -58,7 +52,7 @@ def main(hs, room_id, access_token, user_id_prefix, why):
print("The following user IDs will be kicked from %s" % room_name)
for uid in kick_list:
print(uid)
doit = raw_input("Continue? [Y]es\n")
doit = input("Continue? [Y]es\n")
if len(doit) > 0 and doit.lower() == "y":
print("Kicking members...")
# encode them all

14
debian/changelog vendored
View file

@ -1,8 +1,18 @@
matrix-synapse-py3 (1.20.0ubuntu1) UNRELEASED; urgency=medium
matrix-synapse-py3 (1.20.1) stable; urgency=medium
* New synapse release 1.20.1.
-- Synapse Packaging team <packages@matrix.org> Thu, 24 Sep 2020 16:25:22 +0100
matrix-synapse-py3 (1.20.0) stable; urgency=medium
[ Synapse Packaging team ]
* New synapse release 1.20.0.
[ Dexter Chua ]
* Use Type=notify in systemd service
-- Dexter Chua <dec41@srcf.net> Wed, 26 Aug 2020 12:41:36 +0000
-- Synapse Packaging team <packages@matrix.org> Tue, 22 Sep 2020 15:19:32 +0100
matrix-synapse-py3 (1.19.3) stable; urgency=medium

View file

@ -0,0 +1,129 @@
Show reported events
====================
This API returns information about reported events.
The api is::
GET /_synapse/admin/v1/event_reports?from=0&limit=10
To use it, you will need to authenticate by providing an ``access_token`` for a
server admin: see `README.rst <README.rst>`_.
It returns a JSON body like the following:
.. code:: jsonc
{
"event_reports": [
{
"content": {
"reason": "foo",
"score": -100
},
"event_id": "$bNUFCwGzWca1meCGkjp-zwslF-GfVcXukvRLI1_FaVY",
"event_json": {
"auth_events": [
"$YK4arsKKcc0LRoe700pS8DSjOvUT4NDv0HfInlMFw2M",
"$oggsNXxzPFRE3y53SUNd7nsj69-QzKv03a1RucHu-ws"
],
"content": {
"body": "matrix.org: This Week in Matrix",
"format": "org.matrix.custom.html",
"formatted_body": "<strong>matrix.org</strong>:<br><a href=\"https://matrix.org/blog/\"><strong>This Week in Matrix</strong></a>",
"msgtype": "m.notice"
},
"depth": 546,
"hashes": {
"sha256": "xK1//xnmvHJIOvbgXlkI8eEqdvoMmihVDJ9J4SNlsAw"
},
"origin": "matrix.org",
"origin_server_ts": 1592291711430,
"prev_events": [
"$YK4arsKKcc0LRoe700pS8DSjOvUT4NDv0HfInlMFw2M"
],
"prev_state": [],
"room_id": "!ERAgBpSOcCCuTJqQPk:matrix.org",
"sender": "@foobar:matrix.org",
"signatures": {
"matrix.org": {
"ed25519:a_JaEG": "cs+OUKW/iHx5pEidbWxh0UiNNHwe46Ai9LwNz+Ah16aWDNszVIe2gaAcVZfvNsBhakQTew51tlKmL2kspXk/Dg"
}
},
"type": "m.room.message",
"unsigned": {
"age_ts": 1592291711430,
}
},
"id": 2,
"reason": "foo",
"received_ts": 1570897107409,
"room_alias": "#alias1:matrix.org",
"room_id": "!ERAgBpSOcCCuTJqQPk:matrix.org",
"sender": "@foobar:matrix.org",
"user_id": "@foo:matrix.org"
},
{
"content": {
"reason": "bar",
"score": -100
},
"event_id": "$3IcdZsDaN_En-S1DF4EMCy3v4gNRKeOJs8W5qTOKj4I",
"event_json": {
// hidden items
// see above
},
"id": 3,
"reason": "bar",
"received_ts": 1598889612059,
"room_alias": "#alias2:matrix.org",
"room_id": "!eGvUQuTCkHGVwNMOjv:matrix.org",
"sender": "@foobar:matrix.org",
"user_id": "@bar:matrix.org"
}
],
"next_token": 2,
"total": 4
}
To paginate, check for ``next_token`` and if present, call the endpoint again
with ``from`` set to the value of ``next_token``. This will return a new page.
If the endpoint does not return a ``next_token`` then there are no more
reports to paginate through.
**URL parameters:**
- ``limit``: integer - Is optional but is used for pagination,
denoting the maximum number of items to return in this call. Defaults to ``100``.
- ``from``: integer - Is optional but used for pagination,
denoting the offset in the returned results. This should be treated as an opaque value and
not explicitly set to anything other than the return value of ``next_token`` from a previous call.
Defaults to ``0``.
- ``dir``: string - Direction of event report order. Whether to fetch the most recent first (``b``) or the
oldest first (``f``). Defaults to ``b``.
- ``user_id``: string - Is optional and filters to only return users with user IDs that contain this value.
This is the user who reported the event and wrote the reason.
- ``room_id``: string - Is optional and filters to only return rooms with room IDs that contain this value.
**Response**
The following fields are returned in the JSON response body:
- ``id``: integer - ID of event report.
- ``received_ts``: integer - The timestamp (in milliseconds since the unix epoch) when this report was sent.
- ``room_id``: string - The ID of the room in which the event being reported is located.
- ``event_id``: string - The ID of the reported event.
- ``user_id``: string - This is the user who reported the event and wrote the reason.
- ``reason``: string - Comment made by the ``user_id`` in this report. May be blank.
- ``content``: object - Content of reported event.
- ``reason``: string - Comment made by the ``user_id`` in this report. May be blank.
- ``score``: integer - Content is reported based upon a negative score, where -100 is "most offensive" and 0 is "inoffensive".
- ``sender``: string - This is the ID of the user who sent the original message/event that was reported.
- ``room_alias``: string - The alias of the room. ``null`` if the room does not have a canonical alias set.
- ``event_json``: object - Details of the original event that was reported.
- ``next_token``: integer - Indication for pagination. See above.
- ``total``: integer - Total number of event reports related to the query (``user_id`` and ``room_id``).

View file

@ -275,6 +275,8 @@ The following fields are possible in the JSON response body:
* `room_id` - The ID of the room.
* `name` - The name of the room.
* `topic` - The topic of the room.
* `avatar` - The `mxc` URI to the avatar of the room.
* `canonical_alias` - The canonical (main) alias address of the room.
* `joined_members` - How many users are currently in the room.
* `joined_local_members` - How many local users are currently in the room.
@ -304,6 +306,8 @@ Response:
{
"room_id": "!mscvqgqpHYjBGDxNym:matrix.org",
"name": "Music Theory",
"avatar": "mxc://matrix.org/AQDaVFlbkQoErdOgqWRgiGSV",
"topic": "Theory, Composition, Notation, Analysis",
"canonical_alias": "#musictheory:matrix.org",
"joined_members": 127
"joined_local_members": 2,

View file

@ -304,6 +304,43 @@ To use it, you will need to authenticate by providing an ``access_token`` for a
server admin: see `README.rst <README.rst>`_.
List room memberships of an user
================================
Gets a list of all ``room_id`` that a specific ``user_id`` is member.
The API is::
GET /_synapse/admin/v1/users/<user_id>/joined_rooms
To use it, you will need to authenticate by providing an ``access_token`` for a
server admin: see `README.rst <README.rst>`_.
A response body like the following is returned:
.. code:: json
{
"joined_rooms": [
"!DuGcnbhHGaSZQoNQR:matrix.org",
"!ZtSaPCawyWtxfWiIy:matrix.org"
],
"total": 2
}
**Parameters**
The following parameters should be set in the URL:
- ``user_id`` - fully qualified: for example, ``@user:server.com``.
**Response**
The following fields are returned in the JSON response body:
- ``joined_rooms`` - An array of ``room_id``.
- ``total`` - Number of rooms.
User devices
============

View file

@ -106,6 +106,17 @@ Note that the above may fail with an error about duplicate rows if corruption
has already occurred, and such duplicate rows will need to be manually removed.
## Fixing inconsistent sequences error
Synapse uses Postgres sequences to generate IDs for various tables. A sequence
and associated table can get out of sync if, for example, Synapse has been
downgraded and then upgraded again.
To fix the issue shut down Synapse (including any and all workers) and run the
SQL command included in the error message. Once done Synapse should start
successfully.
## Tuning Postgres
The default settings should be fine for most deployments. For larger

Some files were not shown because too many files have changed in this diff Show more