0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-15 22:42:23 +01:00
Commit graph

23118 commits

Author SHA1 Message Date
Chen Zhang
692ee2af19
Fix inaccurate error message while trying to ban or unban a user with the same or higher PL (#16205) 2023-08-29 10:37:09 +01:00
Patrick Cloke
40901af5e0
Pass the device ID around in the presence handler (#16171)
Refactoring to pass the device ID (in addition to the user ID) through
the presence handler (specifically the `user_syncing`, `set_state`,
and `bump_presence_active_time` methods and their replication
versions).
2023-08-28 13:08:49 -04:00
Patrick Cloke
1bf143699c
Combine logic about not overriding BUSY presence. (#16170)
Simplify some of the presence code by reducing duplicated code between
worker & non-worker modes.

The main change is to push some of the logic from `user_syncing` into
`set_state`. This is done by passing whether the user is setting the presence
via a `/sync` with a new `is_sync` flag to `set_state`. If this is `true` some
additional logic is performed:

* Don't override `busy` presence.
* Update the `last_user_sync_ts`.
* Never update the status message.
2023-08-28 11:03:23 -04:00
Mathieu Velten
501da8ecd8
Task scheduler: add replication notify for new task to launch ASAP (#16184) 2023-08-28 14:03:51 +00:00
dependabot[bot]
224c2bbcfa
Bump serde from 1.0.184 to 1.0.188 (#16194)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.184 to 1.0.188.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.184...v1.0.188)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 15:38:45 +02:00
Patrick Cloke
4379d3ef63
Bump setuptools-rust from 1.6.0 to 1.7.0. (#16201) 2023-08-28 09:04:15 -04:00
dependabot[bot]
1511a55539
Bump regex from 1.9.3 to 1.9.4 (#16195)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 08:01:23 -04:00
dependabot[bot]
c0bbad8a96
Bump psycopg2 from 2.9.6 to 2.9.7 (#16196)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 07:59:27 -04:00
dependabot[bot]
743860e6a6
Bump types-pyyaml from 6.0.12.10 to 6.0.12.11 (#16199)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 07:54:13 -04:00
dependabot[bot]
e54c1d4ed3
Bump types-psycopg2 from 2.9.21.10 to 2.9.21.11 (#16200)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 07:53:57 -04:00
V02460
84f441f88f
Prepare unit tests for Python 3.12 (#16099) 2023-08-25 15:05:10 -04:00
Patrick Cloke
ed6de4b2d4
service-identity, incremental, and setuptools-rust now have type hints. (#16186) 2023-08-25 14:10:47 -04:00
Patrick Cloke
82699428e3
Validate input to POST /key/v2/query endpoint. (#16183)
To avoid 500 internal server errors with garbage input.
2023-08-25 14:10:31 -04:00
Patrick Cloke
fcf7a5759e
Send proper JSON POST data to /publicRooms (#16185)
The include_all_networks was previously sent in the JSON body as
string "true" and "false" instead of boolean true and false.
2023-08-25 12:11:40 -04:00
Patrick Cloke
a8a46b1336
Replace simple_async_mock with AsyncMock (#16180)
Python 3.8 has a native AsyncMock, use it instead of a custom
implementation.
2023-08-25 09:27:21 -04:00
Will Hunt
5c9402b9fd
Add warnings about MSC3861 on certain APIs. (#16168) 2023-08-25 07:25:34 -04:00
Patrick Cloke
daf11e26ef
Replace make_awaitable with AsyncMock (#16179)
Python 3.8 provides a native AsyncMock, we can replace the
homegrown version we have.
2023-08-24 19:38:46 -04:00
Shay
5856a8ba42
Document exclude_rooms_fom_sync configuration option (#16178) 2023-08-24 13:57:53 -07:00
Aurélien Grimpard
aeeca2a62e
Add configuration setting for CAS protocol version (#15816) 2023-08-24 16:11:23 -04:00
dependabot[bot]
efdb87c898
Bump anyhow from 1.0.72 to 1.0.75 (#16141)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-24 15:50:41 -04:00
Amirreza Aflakparast
5427cc20b9
Update URLs to matrix.org blog categories. (#16008) 2023-08-24 11:06:06 -04:00
David Robertson
e691243e19
Fix typechecking with twisted trunk (#16121) 2023-08-24 14:53:07 +00:00
Will Hunt
0538e3e2db
Add Retry-After to M_LIMIT_EXCEEDED error responses (#16136)
Implements MSC4041 behind an experimental configuration flag.
2023-08-24 10:40:26 -04:00
dependabot[bot]
e3333bacff
Bump serde_json from 1.0.104 to 1.0.105 (#16140)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-24 08:49:37 -04:00
H. Shay
851cbdcb57 Merge branch 'release-v1.91' into develop 2023-08-23 11:44:01 -07:00
Patrick Cloke
33fa82a34c
Stabilize support for MSC3958 (suppress notifications from edits). (#16113) 2023-08-23 13:22:34 -04:00
H. Shay
23f88f9c59 1.91.0rc1 2023-08-23 09:47:29 -07:00
H. Shay
020ff1afe3 fix changelog 2023-08-23 09:36:34 -07:00
H. Shay
7064b4bcf3 fix changelog 2023-08-23 09:25:50 -07:00
Erik Johnston
18279631e9
Fix rare deadlock when using read/write locks (#16169) 2023-08-23 16:24:30 +01:00
Andrew Morgan
85118420a2
Switch devenv dependency in the nix development environment to the latest release (instead of the development branch) (#16063) 2023-08-23 16:16:14 +01:00
Neil Johnson
ec662bbe41
Filter out unwanted user_agents from udv. (#16124) 2023-08-23 14:00:34 +01:00
Erik Johnston
4adaba9acf
Fix rare deadlock when using read/write locks (#16133) 2023-08-23 13:45:25 +01:00
Erik Johnston
7cd79ce051
Reduce DB contention on worker locks (#16160) 2023-08-23 13:45:19 +01:00
Erik Johnston
86ecd341ec
Always update retry_last_ts (#16164) 2023-08-23 13:04:46 +01:00
Mathieu Velten
873971a8b9
Task scheduler: mark task as active if we are scheduling ASAP (#16165) 2023-08-23 13:37:51 +02:00
Patrick Cloke
da162cbe4e
Add tests for restoring the presence state after a restart. (#16151) 2023-08-23 07:31:00 -04:00
DeepBlueV7.X
19a1cda084
Properly update retry_last_ts when hitting the maximum retry interval (#16156)
* Properly update retry_last_ts when hitting the maximum retry interval

This was broken in 1.87 when the maximum retry interval got changed from
almost infinite to a week (and made configurable).

fixes #16101

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Add changelog

* Change fix + add test

* Add comment

---------

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
Co-authored-by: Mathieu Velten <mathieuv@matrix.org>
2023-08-23 09:35:23 +01:00
Erik Johnston
dffe095642
Only lock when we're backfilling (#16159) 2023-08-23 09:23:41 +01:00
Erik Johnston
3b3fed7229
Increase perf of read/write locks (#16149)
We do this by marking the tables as `UNLOGGED` in PostgreSQL.
2023-08-23 09:23:22 +01:00
Patrick Cloke
3f17178728
Clean-up presence tests (#16158)
Reduce duplicated code & remove unused variables.
2023-08-22 11:43:44 -04:00
Erik Johnston
803f63df1c
Fix perf of wait_for_stream_positions (#16148) 2023-08-22 15:11:22 +00:00
Mathieu Velten
0ba17777be
Disable m.3pid_changes capability when MSC3861 is enabled. (#16134) 2023-08-22 14:47:59 +00:00
Shay
69048f7b48
Add an admin endpoint to allow authorizing server to signal token revocations (#16125) 2023-08-22 14:15:34 +00:00
dependabot[bot]
8aa5479986
Bump serde from 1.0.183 to 1.0.184 (#16139)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-22 09:48:06 -04:00
Patrick Cloke
b657e89005
Fix user directory test for deactivated support user. (#16157)
Support users should not be added to the user directory after
being deactivated.
2023-08-22 09:08:24 -04:00
Theodore Ni
bc72d803d5
Raise poetry-core version cap to 1.7.0 (#16152) 2023-08-22 13:51:35 +01:00
Patrick Cloke
6d7c63fcc6
Properly call setup_background_tasks in unit tests. (#16150)
This should only be called on HomeServer objects which are configured
to run background tasks, which is automatically (and properly) done via
the call to setup().
2023-08-22 07:46:32 -04:00
Hugh Nimmo-Smith
7dbac123f9
Disallow user_consent where experimental MSC3861 is enabled (#16127) 2023-08-22 07:42:08 -04:00
Maximilian Bosch
d6ae4041a4
Add client_secret_path as alternative for client_secret for OIDC config (#16030) 2023-08-21 19:32:17 +00:00