Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 4bbdb01

Browse files
committed
Merge tag 'v1.46.0' into babolivier/dinsic_1.48.0
Synapse 1.46.0 (2021-11-02) =========================== The cause of the [performance regression affecting Synapse 1.44](matrix-org/synapse#11049) has been identified and fixed. ([\#11177](matrix-org/synapse#11177)) Bugfixes -------- - Fix a bug introduced in v1.46.0rc1 where URL previews of some XML documents would fail. ([\#11196](matrix-org/synapse#11196)) Synapse 1.46.0rc1 (2021-10-27) ============================== Features -------- - Add support for Ubuntu 21.10 "Impish Indri". ([\#11024](matrix-org/synapse#11024)) - Port the Password Auth Providers module interface to the new generic interface. ([\#10548](matrix-org/synapse#10548), [\#11180](matrix-org/synapse#11180)) - Experimental support for the thread relation defined in [MSC3440](matrix-org/matrix-spec-proposals#3440). ([\#11088](matrix-org/synapse#11088), [\#11181](matrix-org/synapse#11181), [\#11192](matrix-org/synapse#11192)) - Users admin API can now also modify user type in addition to allowing it to be set on user creation. ([\#11174](matrix-org/synapse#11174)) Bugfixes -------- - Newly-created public rooms are now only assigned an alias if the room's creation has not been blocked by permission settings. Contributed by @AndrewFerr. ([\#10930](matrix-org/synapse#10930)) - Fix a long-standing bug which meant that events received over federation were sometimes incorrectly accepted into the room state. ([\#11001](matrix-org/synapse#11001), [\#11009](matrix-org/synapse#11009), [\#11012](matrix-org/synapse#11012)) - Fix 500 error on `/messages` when the server accumulates more than 5 backwards extremities at a given depth for a room. ([\#11027](matrix-org/synapse#11027)) - Fix a bug where setting a user's `external_id` via the admin API returns 500 and deletes user's existing external mappings if that external ID is already mapped. ([\#11051](matrix-org/synapse#11051)) - Fix a long-standing bug where users excluded from the user directory were added into the directory if they belonged to a room which became public or private. ([\#11075](matrix-org/synapse#11075)) - Fix a long-standing bug when attempting to preview URLs which are in the `windows-1252` character encoding. ([\#11077](matrix-org/synapse#11077), [\#11089](matrix-org/synapse#11089)) - Fix broken export-data admin command and add test script checking the command to CI. ([\#11078](matrix-org/synapse#11078)) - Show an error when timestamp in seconds is provided to the `/purge_media_cache` Admin API. ([\#11101](matrix-org/synapse#11101)) - Fix local users who left all their rooms being removed from the user directory, even if the `search_all_users` config option was enabled. ([\#11103](matrix-org/synapse#11103)) - Fix a bug which caused the module API's `get_user_ip_and_agents` function to always fail on workers. `get_user_ip_and_agents` was introduced in 1.44.0 and did not function correctly on worker processes at the time. ([\#11112](matrix-org/synapse#11112)) - Identity server connection is no longer ignoring `ip_range_whitelist`. ([\#11120](matrix-org/synapse#11120)) - Fix a bug introduced in Synapse 1.45.0 breaking the configuration file parsing script. ([\#11145](matrix-org/synapse#11145)) - Fix a performance regression introduced in 1.44.0 which could cause client requests to time out when making large numbers of outbound requests. ([\#11177](matrix-org/synapse#11177), [\#11190](matrix-org/synapse#11190)) - Resolve and share `state_groups` for all [MSC2716](matrix-org/matrix-spec-proposals#2716) historical events in batch. ([\#10975](matrix-org/synapse#10975)) Improved Documentation ---------------------- - Fix broken links relating to module API deprecation in the upgrade notes. ([\#11069](matrix-org/synapse#11069)) - Add more information about what happens when a user is deactivated. ([\#11083](matrix-org/synapse#11083)) - Clarify the the sample log config can be copied from the documentation without issue. ([\#11092](matrix-org/synapse#11092)) - Update the admin API documentation with an updated list of the characters allowed in registration tokens. ([\#11093](matrix-org/synapse#11093)) - Document Synapse's behaviour when dealing with multiple modules registering the same callbacks and/or handlers for the same HTTP endpoints. ([\#11096](matrix-org/synapse#11096)) - Fix instances of `[example]{.title-ref}` in the upgrade documentation as a result of prior RST to Markdown conversion. ([\#11118](matrix-org/synapse#11118)) - Document the version of Synapse each module callback was introduced in. ([\#11132](matrix-org/synapse#11132)) - Document the version of Synapse that introduced each module API method. ([\#11183](matrix-org/synapse#11183)) Internal Changes ---------------- - Fix spurious warnings about losing the logging context on the `ReplicationCommandHandler` when losing the replication connection. ([\#10984](matrix-org/synapse#10984)) - Include rejected status when we log events. ([\#11008](matrix-org/synapse#11008)) - Add some extra logging to the event persistence code. ([\#11014](matrix-org/synapse#11014)) - Rearrange the internal workings of the incremental user directory updates. ([\#11035](matrix-org/synapse#11035)) - Fix a long-standing bug where users excluded from the directory could still be added to the `users_who_share_private_rooms` table after a regular user joins a private room. ([\#11143](matrix-org/synapse#11143)) - Add and improve type hints. ([\#10972](matrix-org/synapse#10972), [\#11055](matrix-org/synapse#11055), [\#11066](matrix-org/synapse#11066), [\#11076](matrix-org/synapse#11076), [\#11095](matrix-org/synapse#11095), [\#11109](matrix-org/synapse#11109), [\#11121](matrix-org/synapse#11121), [\#11146](matrix-org/synapse#11146)) - Mark the Synapse package as containing type annotations and fix export declarations so that Synapse pluggable modules may be type checked against Synapse. ([\#11054](matrix-org/synapse#11054)) - Remove dead code from `MediaFilePaths`. ([\#11056](matrix-org/synapse#11056)) - Be more lenient when parsing oEmbed response versions. ([\#11065](matrix-org/synapse#11065)) - Create a separate module for the retention configuration. ([\#11070](matrix-org/synapse#11070)) - Clean up some of the federation event authentication code for clarity. ([\#11115](matrix-org/synapse#11115), [\#11116](matrix-org/synapse#11116), [\#11122](matrix-org/synapse#11122)) - Add docstrings and comments to the application service ephemeral event sending code. ([\#11138](matrix-org/synapse#11138)) - Update the `sign_json` script to support inline configuration of the signing key. ([\#11139](matrix-org/synapse#11139)) - Fix broken link in the docker image README. ([\#11144](matrix-org/synapse#11144)) - Always dump logs from unit tests during CI runs. ([\#11068](matrix-org/synapse#11068)) - Add tests for `MediaFilePaths` class. ([\#11057](matrix-org/synapse#11057)) - Simplify the user admin API tests. ([\#11048](matrix-org/synapse#11048)) - Add a test for the workaround introduced in [\#11042](matrix-org/synapse#11042) concerning the behaviour of third-party rule modules and `SynapseError`s. ([\#11071](matrix-org/synapse#11071))
2 parents 21d74d5 + 2d44ee6 commit 4bbdb01

File tree

171 files changed

+5565
-2280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+5565
-2280
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/usr/bin/env bash
2+
3+
# Test for the export-data admin command against sqlite and postgres
4+
5+
set -xe
6+
cd `dirname $0`/../..
7+
8+
echo "--- Install dependencies"
9+
10+
# Install dependencies for this test.
11+
pip install psycopg2
12+
13+
# Install Synapse itself. This won't update any libraries.
14+
pip install -e .
15+
16+
echo "--- Generate the signing key"
17+
18+
# Generate the server's signing key.
19+
python -m synapse.app.homeserver --generate-keys -c .ci/sqlite-config.yaml
20+
21+
echo "--- Prepare test database"
22+
23+
# Make sure the SQLite3 database is using the latest schema and has no pending background update.
24+
scripts/update_synapse_database --database-config .ci/sqlite-config.yaml --run-background-updates
25+
26+
# Run the export-data command on the sqlite test database
27+
python -m synapse.app.admin_cmd -c .ci/sqlite-config.yaml export-data @anon-20191002_181700-832:localhost:8800 \
28+
--output-directory /tmp/export_data
29+
30+
# Test that the output directory exists and contains the rooms directory
31+
dir="/tmp/export_data/rooms"
32+
if [ -d "$dir" ]; then
33+
echo "Command successful, this test passes"
34+
else
35+
echo "No output directories found, the command fails against a sqlite database."
36+
exit 1
37+
fi
38+
39+
# Create the PostgreSQL database.
40+
.ci/scripts/postgres_exec.py "CREATE DATABASE synapse"
41+
42+
# Port the SQLite databse to postgres so we can check command works against postgres
43+
echo "+++ Port SQLite3 databse to postgres"
44+
scripts/synapse_port_db --sqlite-database .ci/test_db.db --postgres-config .ci/postgres-config.yaml
45+
46+
# Run the export-data command on postgres database
47+
python -m synapse.app.admin_cmd -c .ci/postgres-config.yaml export-data @anon-20191002_181700-832:localhost:8800 \
48+
--output-directory /tmp/export_data2
49+
50+
# Test that the output directory exists and contains the rooms directory
51+
dir2="/tmp/export_data2/rooms"
52+
if [ -d "$dir2" ]; then
53+
echo "Command successful, this test passes"
54+
else
55+
echo "No output directories found, the command fails against a postgres database."
56+
exit 1
57+
fi

.github/workflows/tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ jobs:
122122
SYNAPSE_POSTGRES_USER: postgres
123123
SYNAPSE_POSTGRES_PASSWORD: postgres
124124
- name: Dump logs
125+
# Logs are most useful when the command fails, always include them.
126+
if: ${{ always() }}
125127
# Note: Dumps to workflow logs instead of using actions/upload-artifact
126128
# This keeps logs colocated with failing jobs
127129
# It also ignores find's exit code; this is a best effort affair
@@ -146,6 +148,8 @@ jobs:
146148
env:
147149
TRIAL_FLAGS: "--jobs=2"
148150
- name: Dump logs
151+
# Logs are most useful when the command fails, always include them.
152+
if: ${{ always() }}
149153
# Note: Dumps to workflow logs instead of using actions/upload-artifact
150154
# This keeps logs colocated with failing jobs
151155
# It also ignores find's exit code; this is a best effort affair
@@ -176,6 +180,8 @@ jobs:
176180
env:
177181
TRIAL_FLAGS: "--jobs=2"
178182
- name: Dump logs
183+
# Logs are most useful when the command fails, always include them.
184+
if: ${{ always() }}
179185
# Note: Dumps to workflow logs instead of using actions/upload-artifact
180186
# This keeps logs colocated with failing jobs
181187
# It also ignores find's exit code; this is a best effort affair
@@ -240,6 +246,35 @@ jobs:
240246
/logs/results.tap
241247
/logs/**/*.log*
242248
249+
export-data:
250+
if: ${{ !failure() && !cancelled() }} # Allow previous steps to be skipped, but not fail
251+
needs: [linting-done, portdb]
252+
runs-on: ubuntu-latest
253+
env:
254+
TOP: ${{ github.workspace }}
255+
256+
services:
257+
postgres:
258+
image: postgres
259+
ports:
260+
- 5432:5432
261+
env:
262+
POSTGRES_PASSWORD: "postgres"
263+
POSTGRES_INITDB_ARGS: "--lc-collate C --lc-ctype C --encoding UTF8"
264+
options: >-
265+
--health-cmd pg_isready
266+
--health-interval 10s
267+
--health-timeout 5s
268+
--health-retries 5
269+
270+
steps:
271+
- uses: actions/checkout@v2
272+
- run: sudo apt-get -qq install xmlsec1
273+
- uses: actions/setup-python@v2
274+
with:
275+
python-version: "3.9"
276+
- run: .ci/scripts/test_export_data_command.sh
277+
243278
portdb:
244279
if: ${{ !failure() && !cancelled() }} # Allow previous steps to be skipped, but not fail
245280
needs: linting-done

.github/workflows/twisted_trunk.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
TRIAL_FLAGS: "--jobs=2"
3434

3535
- name: Dump logs
36+
# Logs are most useful when the command fails, always include them.
37+
if: ${{ always() }}
3638
# Note: Dumps to workflow logs instead of using actions/upload-artifact
3739
# This keeps logs colocated with failing jobs
3840
# It also ignores find's exit code; this is a best effort affair

CHANGES.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,80 @@
1+
Synapse 1.46.0 (2021-11-02)
2+
===========================
3+
4+
The cause of the [performance regression affecting Synapse 1.44](https://github.com/matrix-org/synapse/issues/11049) has been identified and fixed. ([\#11177](https://github.com/matrix-org/synapse/issues/11177))
5+
6+
Bugfixes
7+
--------
8+
9+
- Fix a bug introduced in v1.46.0rc1 where URL previews of some XML documents would fail. ([\#11196](https://github.com/matrix-org/synapse/issues/11196))
10+
11+
12+
Synapse 1.46.0rc1 (2021-10-27)
13+
==============================
14+
15+
Features
16+
--------
17+
18+
- Add support for Ubuntu 21.10 "Impish Indri". ([\#11024](https://github.com/matrix-org/synapse/issues/11024))
19+
- Port the Password Auth Providers module interface to the new generic interface. ([\#10548](https://github.com/matrix-org/synapse/issues/10548), [\#11180](https://github.com/matrix-org/synapse/issues/11180))
20+
- Experimental support for the thread relation defined in [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440). ([\#11088](https://github.com/matrix-org/synapse/issues/11088), [\#11181](https://github.com/matrix-org/synapse/issues/11181), [\#11192](https://github.com/matrix-org/synapse/issues/11192))
21+
- Users admin API can now also modify user type in addition to allowing it to be set on user creation. ([\#11174](https://github.com/matrix-org/synapse/issues/11174))
22+
23+
24+
Bugfixes
25+
--------
26+
27+
- Newly-created public rooms are now only assigned an alias if the room's creation has not been blocked by permission settings. Contributed by @AndrewFerr. ([\#10930](https://github.com/matrix-org/synapse/issues/10930))
28+
- Fix a long-standing bug which meant that events received over federation were sometimes incorrectly accepted into the room state. ([\#11001](https://github.com/matrix-org/synapse/issues/11001), [\#11009](https://github.com/matrix-org/synapse/issues/11009), [\#11012](https://github.com/matrix-org/synapse/issues/11012))
29+
- Fix 500 error on `/messages` when the server accumulates more than 5 backwards extremities at a given depth for a room. ([\#11027](https://github.com/matrix-org/synapse/issues/11027))
30+
- Fix a bug where setting a user's `external_id` via the admin API returns 500 and deletes user's existing external mappings if that external ID is already mapped. ([\#11051](https://github.com/matrix-org/synapse/issues/11051))
31+
- Fix a long-standing bug where users excluded from the user directory were added into the directory if they belonged to a room which became public or private. ([\#11075](https://github.com/matrix-org/synapse/issues/11075))
32+
- Fix a long-standing bug when attempting to preview URLs which are in the `windows-1252` character encoding. ([\#11077](https://github.com/matrix-org/synapse/issues/11077), [\#11089](https://github.com/matrix-org/synapse/issues/11089))
33+
- Fix broken export-data admin command and add test script checking the command to CI. ([\#11078](https://github.com/matrix-org/synapse/issues/11078))
34+
- Show an error when timestamp in seconds is provided to the `/purge_media_cache` Admin API. ([\#11101](https://github.com/matrix-org/synapse/issues/11101))
35+
- Fix local users who left all their rooms being removed from the user directory, even if the `search_all_users` config option was enabled. ([\#11103](https://github.com/matrix-org/synapse/issues/11103))
36+
- Fix a bug which caused the module API's `get_user_ip_and_agents` function to always fail on workers. `get_user_ip_and_agents` was introduced in 1.44.0 and did not function correctly on worker processes at the time. ([\#11112](https://github.com/matrix-org/synapse/issues/11112))
37+
- Identity server connection is no longer ignoring `ip_range_whitelist`. ([\#11120](https://github.com/matrix-org/synapse/issues/11120))
38+
- Fix a bug introduced in Synapse 1.45.0 breaking the configuration file parsing script. ([\#11145](https://github.com/matrix-org/synapse/issues/11145))
39+
- Fix a performance regression introduced in 1.44.0 which could cause client requests to time out when making large numbers of outbound requests. ([\#11177](https://github.com/matrix-org/synapse/issues/11177), [\#11190](https://github.com/matrix-org/synapse/issues/11190))
40+
- Resolve and share `state_groups` for all [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) historical events in batch. ([\#10975](https://github.com/matrix-org/synapse/issues/10975))
41+
42+
43+
Improved Documentation
44+
----------------------
45+
46+
- Fix broken links relating to module API deprecation in the upgrade notes. ([\#11069](https://github.com/matrix-org/synapse/issues/11069))
47+
- Add more information about what happens when a user is deactivated. ([\#11083](https://github.com/matrix-org/synapse/issues/11083))
48+
- Clarify the the sample log config can be copied from the documentation without issue. ([\#11092](https://github.com/matrix-org/synapse/issues/11092))
49+
- Update the admin API documentation with an updated list of the characters allowed in registration tokens. ([\#11093](https://github.com/matrix-org/synapse/issues/11093))
50+
- Document Synapse's behaviour when dealing with multiple modules registering the same callbacks and/or handlers for the same HTTP endpoints. ([\#11096](https://github.com/matrix-org/synapse/issues/11096))
51+
- Fix instances of `[example]{.title-ref}` in the upgrade documentation as a result of prior RST to Markdown conversion. ([\#11118](https://github.com/matrix-org/synapse/issues/11118))
52+
- Document the version of Synapse each module callback was introduced in. ([\#11132](https://github.com/matrix-org/synapse/issues/11132))
53+
- Document the version of Synapse that introduced each module API method. ([\#11183](https://github.com/matrix-org/synapse/issues/11183))
54+
55+
56+
Internal Changes
57+
----------------
58+
- Fix spurious warnings about losing the logging context on the `ReplicationCommandHandler` when losing the replication connection. ([\#10984](https://github.com/matrix-org/synapse/issues/10984))
59+
- Include rejected status when we log events. ([\#11008](https://github.com/matrix-org/synapse/issues/11008))
60+
- Add some extra logging to the event persistence code. ([\#11014](https://github.com/matrix-org/synapse/issues/11014))
61+
- Rearrange the internal workings of the incremental user directory updates. ([\#11035](https://github.com/matrix-org/synapse/issues/11035))
62+
- Fix a long-standing bug where users excluded from the directory could still be added to the `users_who_share_private_rooms` table after a regular user joins a private room. ([\#11143](https://github.com/matrix-org/synapse/issues/11143))
63+
- Add and improve type hints. ([\#10972](https://github.com/matrix-org/synapse/issues/10972), [\#11055](https://github.com/matrix-org/synapse/issues/11055), [\#11066](https://github.com/matrix-org/synapse/issues/11066), [\#11076](https://github.com/matrix-org/synapse/issues/11076), [\#11095](https://github.com/matrix-org/synapse/issues/11095), [\#11109](https://github.com/matrix-org/synapse/issues/11109), [\#11121](https://github.com/matrix-org/synapse/issues/11121), [\#11146](https://github.com/matrix-org/synapse/issues/11146))
64+
- Mark the Synapse package as containing type annotations and fix export declarations so that Synapse pluggable modules may be type checked against Synapse. ([\#11054](https://github.com/matrix-org/synapse/issues/11054))
65+
- Remove dead code from `MediaFilePaths`. ([\#11056](https://github.com/matrix-org/synapse/issues/11056))
66+
- Be more lenient when parsing oEmbed response versions. ([\#11065](https://github.com/matrix-org/synapse/issues/11065))
67+
- Create a separate module for the retention configuration. ([\#11070](https://github.com/matrix-org/synapse/issues/11070))
68+
- Clean up some of the federation event authentication code for clarity. ([\#11115](https://github.com/matrix-org/synapse/issues/11115), [\#11116](https://github.com/matrix-org/synapse/issues/11116), [\#11122](https://github.com/matrix-org/synapse/issues/11122))
69+
- Add docstrings and comments to the application service ephemeral event sending code. ([\#11138](https://github.com/matrix-org/synapse/issues/11138))
70+
- Update the `sign_json` script to support inline configuration of the signing key. ([\#11139](https://github.com/matrix-org/synapse/issues/11139))
71+
- Fix broken link in the docker image README. ([\#11144](https://github.com/matrix-org/synapse/issues/11144))
72+
- Always dump logs from unit tests during CI runs. ([\#11068](https://github.com/matrix-org/synapse/issues/11068))
73+
- Add tests for `MediaFilePaths` class. ([\#11057](https://github.com/matrix-org/synapse/issues/11057))
74+
- Simplify the user admin API tests. ([\#11048](https://github.com/matrix-org/synapse/issues/11048))
75+
- Add a test for the workaround introduced in [\#11042](https://github.com/matrix-org/synapse/pull/11042) concerning the behaviour of third-party rule modules and `SynapseError`s. ([\#11071](https://github.com/matrix-org/synapse/issues/11071))
76+
77+
178
Synapse 1.45.1 (2021-10-20)
279
===========================
380

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ include demo/demo.tls.dh
99
include demo/*.py
1010
include demo/*.sh
1111

12+
include synapse/py.typed
1213
recursive-include synapse/storage *.sql
1314
recursive-include synapse/storage *.sql.postgres
1415
recursive-include synapse/storage *.sql.sqlite

debian/changelog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
matrix-synapse-py3 (1.46.0) stable; urgency=medium
2+
3+
[ Richard van der Hoff ]
4+
* Compress debs with xz, to fix incompatibility of impish debs with reprepro.
5+
6+
[ Synapse Packaging team ]
7+
* New synapse release 1.46.0.
8+
9+
-- Synapse Packaging team <[email protected]> Tue, 02 Nov 2021 13:22:53 +0000
10+
11+
matrix-synapse-py3 (1.46.0~rc1) stable; urgency=medium
12+
13+
* New synapse release 1.46.0~rc1.
14+
15+
-- Synapse Packaging team <[email protected]> Tue, 26 Oct 2021 14:04:04 +0100
16+
117
matrix-synapse-py3 (1.45.1) stable; urgency=medium
218

319
* New synapse release 1.45.1.

debian/rules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,11 @@ override_dh_shlibdeps:
5151
override_dh_virtualenv:
5252
./debian/build_virtualenv
5353

54+
override_dh_builddeb:
55+
# force the compression to xzip, to stop dpkg-deb on impish defaulting to zstd
56+
# (which requires reprepro 5.3.0-1.3, which is currently only in 'experimental' in Debian:
57+
# https://metadata.ftp-master.debian.org/changelogs/main/r/reprepro/reprepro_5.3.0-1.3_changelog)
58+
dh_builddeb -- -Zxz
59+
5460
%:
5561
dh $@ --with python-virtualenv

docker/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,5 @@ healthcheck:
226226
## Using jemalloc
227227

228228
Jemalloc is embedded in the image and will be used instead of the default allocator.
229-
You can read about jemalloc by reading the Synapse [README](../README.rst).
229+
You can read about jemalloc by reading the Synapse
230+
[README](https://github.com/matrix-org/synapse/blob/HEAD/README.rst#help-synapse-is-slow-and-eats-all-my-ram-cpu).

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
- [Third-party rules callbacks](modules/third_party_rules_callbacks.md)
4444
- [Presence router callbacks](modules/presence_router_callbacks.md)
4545
- [Account validity callbacks](modules/account_validity_callbacks.md)
46+
- [Password auth provider callbacks](modules/password_auth_provider_callbacks.md)
4647
- [Porting a legacy module to the new interface](modules/porting_legacy_module.md)
4748
- [Workers](workers.md)
4849
- [Using `synctl` with Workers](synctl_workers.md)

docs/admin_api/media_admin_api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ POST /_synapse/admin/v1/media/<server_name>/delete?before_ts=<before_ts>
257257
URL Parameters
258258

259259
* `server_name`: string - The name of your local server (e.g `matrix.org`).
260-
* `before_ts`: string representing a positive integer - Unix timestamp in ms.
260+
* `before_ts`: string representing a positive integer - Unix timestamp in milliseconds.
261261
Files that were last used before this timestamp will be deleted. It is the timestamp of
262-
last access and not the timestamp creation.
262+
last access, not the timestamp when the file was created.
263263
* `size_gt`: Optional - string representing a positive integer - Size of the media in bytes.
264264
Files that are larger will be deleted. Defaults to `0`.
265265
* `keep_profiles`: Optional - string representing a boolean - Switch to also delete files
@@ -302,7 +302,7 @@ POST /_synapse/admin/v1/purge_media_cache?before_ts=<unix_timestamp_in_ms>
302302

303303
URL Parameters
304304

305-
* `unix_timestamp_in_ms`: string representing a positive integer - Unix timestamp in ms.
305+
* `unix_timestamp_in_ms`: string representing a positive integer - Unix timestamp in milliseconds.
306306
All cached media that was last accessed before this timestamp will be removed.
307307

308308
Response:

docs/admin_api/user_admin_api.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ It returns a JSON body like the following:
5050
"auth_provider": "<provider2>",
5151
"external_id": "<user_id_provider_2>"
5252
}
53-
]
53+
],
54+
"user_type": null
5455
}
5556
```
5657

@@ -97,7 +98,8 @@ with a body of:
9798
],
9899
"avatar_url": "<avatar_url>",
99100
"admin": false,
100-
"deactivated": false
101+
"deactivated": false,
102+
"user_type": null
101103
}
102104
```
103105

@@ -135,6 +137,9 @@ Body parameters:
135137
unchanged on existing accounts and set to `false` for new accounts.
136138
A user cannot be erased by deactivating with this API. For details on
137139
deactivating users see [Deactivate Account](#deactivate-account).
140+
- `user_type` - string or null, optional. If provided, the user type will be
141+
adjusted. If `null` given, the user type will be cleared. Other
142+
allowed options are: `bot` and `support`.
138143

139144
If the user already exists then optional parameters default to the current value.
140145

@@ -341,6 +346,7 @@ The following actions are performed when deactivating an user:
341346
- Remove all 3PIDs from the homeserver
342347
- Delete all devices and E2EE keys
343348
- Delete all access tokens
349+
- Delete all pushers
344350
- Delete the password hash
345351
- Removal from all rooms the user is a member of
346352
- Remove the user from the user directory
@@ -354,6 +360,15 @@ is set to `true`:
354360
- Remove the user's avatar URL
355361
- Mark the user as erased
356362

363+
The following actions are **NOT** performed. The list may be incomplete.
364+
365+
- Remove mappings of SSO IDs
366+
- [Delete media uploaded](#delete-media-uploaded-by-a-user) by user (included avatar images)
367+
- Delete sent and received messages
368+
- Delete E2E cross-signing keys
369+
- Remove the user's creation (registration) timestamp
370+
- [Remove rate limit overrides](#override-ratelimiting-for-users)
371+
- Remove from monthly active users
357372

358373
## Reset password
359374

docs/modules/account_validity_callbacks.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ The available account validity callbacks are:
99

1010
### `is_user_expired`
1111

12+
_First introduced in Synapse v1.39.0_
13+
1214
```python
1315
async def is_user_expired(user: str) -> Optional[bool]
1416
```
@@ -22,12 +24,21 @@ If the module returns `True`, the current request will be denied with the error
2224
`ORG_MATRIX_EXPIRED_ACCOUNT` and the HTTP status code 403. Note that this doesn't
2325
invalidate the user's access token.
2426

27+
If multiple modules implement this callback, they will be considered in order. If a
28+
callback returns `None`, Synapse falls through to the next one. The value of the first
29+
callback that does not return `None` will be used. If this happens, Synapse will not call
30+
any of the subsequent implementations of this callback.
31+
2532
### `on_user_registration`
2633

34+
_First introduced in Synapse v1.39.0_
35+
2736
```python
2837
async def on_user_registration(user: str) -> None
2938
```
3039

3140
Called after successfully registering a user, in case the module needs to perform extra
3241
operations to keep track of them. (e.g. add them to a database table). The user is
3342
represented by their Matrix user ID.
43+
44+
If multiple modules implement this callback, Synapse runs them all in order.

0 commit comments

Comments
 (0)