David Robertson
fffb3c4c8f
Always allow the empty string as an avatar_url. ( #12261 )
...
Hopefully this fixes #12257 .
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2022-03-25 13:28:42 +00:00
Richard van der Hoff
b0659a112d
Merge branch 'master' into develop
2022-03-24 19:39:45 +00:00
Richard van der Hoff
1642abd77e
1.55.2
2022-03-24 19:13:20 +00:00
Andrew Morgan
84eb14c4d2
Pin Jinja to <3.1.0 ( #12297 )
...
as 3.1.0 removed the deprecated jinja2.Markup class which we still rely on.
2022-03-24 18:59:31 +00:00
Andrew Morgan
0004260952
Revert "Replace instances of deprecated Jinja2.Markup
with markupsafe.Markup
" ( #12296 )
...
This reverts commit 8810c93e82
.
2022-03-24 18:42:04 +00:00
Andrew Morgan
a503c2c388
Merge branch 'master' into develop
2022-03-24 18:14:26 +00:00
Andrew Morgan
088f3ae182
1.55.1
2022-03-24 17:47:03 +00:00
Andrew Morgan
8810c93e82
Replace instances of deprecated Jinja2.Markup
with markupsafe.Markup
( #12289 )
...
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2022-03-24 17:16:13 +00:00
Patrick Cloke
4df10d3214
Do not consider events by ignored users for relations ( #12285 )
...
Filter the events returned from `/relations` for the requester's ignored users
in a similar way to `/messages` (and `/sync`).
2022-03-24 10:25:42 -04:00
Brendan Abolivier
5436b014f4
Optionally include account validity in MSC3720 account status responses ( #12266 )
2022-03-24 11:19:41 +01:00
Shay
e78d4f61fc
Refuse to start if DB has an unsafe locale ( #12262 )
2022-03-23 10:23:05 -07:00
David Robertson
f4c5e5864c
Use psycopg2 type stubs ( #12269 )
2022-03-23 14:03:24 +00:00
Jonathan de Jong
c5776780f0
Remove mutual_rooms update_user_directory
check, and add extra documentation ( #12038 )
...
Resolves #10339
2022-03-23 12:47:07 +00:00
Nicolas Werner
692b82838e
Allow registering admin users using the module API ( #12250 )
...
Signed-off-by: Nicolas Werner <n.werner@famedly.com>
2022-03-23 12:48:47 +01:00
Jonathan de Jong
516d092ff9
Rename shared_rooms to mutual_rooms ( #12036 )
...
Co-authored-by: reivilibre <olivier@librepush.net>
2022-03-23 11:19:20 +00:00
Andrew Morgan
831d4797ab
Merge branch 'master' into develop
2022-03-22 16:31:28 +00:00
Andrew Morgan
34baf76451
1.55.0
2022-03-22 14:02:52 +00:00
Michael Telatynski
01211e0c16
Tweak copy for sso account details template ( #12265 )
...
* Tweak copy for sso account details template
* Update sso footer copyright year
* Add newsfragment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2022-03-22 10:22:25 +00:00
David Robertson
0a59f977a2
Merge branch 'release-v1.55' into develop
2022-03-21 12:29:53 +00:00
reivilibre
6134b3079e
Reword 'Choose your user name' as 'Choose your account name' in the SSO registration template, in order to comply with SIWA guidelines. ( #12260 )
...
* Reword as 'Choose your account name'
* Newsfile
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2022-03-21 12:16:46 +00:00
Nick Mills-Barrett
1530cef192
Make it possible to enable compression for the metrics HTTP resource ( #12258 )
...
* Make it possible to enable compression for the metrics HTTP resource
This can provide significant bandwidth savings pulling metrics from
synapse instances.
* Add changelog file.
* Fix type hint
2022-03-21 11:52:10 +00:00
Richard van der Hoff
afa17f0eab
Return a 404 from /state
for an outlier ( #12087 )
...
* Replace `get_state_for_pdu` with `get_state_ids_for_pdu` and `get_events_as_list`.
* Return a 404 from `/state` and `/state_ids` for an outlier
2022-03-21 11:23:32 +00:00
David Robertson
bf9d549e3a
Try to detect borked package installations. ( #12244 )
...
* Try to detect borked package installations.
Fixes #12223 .
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2022-03-18 19:03:46 +00:00
Patrick Cloke
8fe930c215
Move get_bundled_aggregations to relations handler. ( #12237 )
...
The get_bundled_aggregations code is fairly high-level and uses
a lot of store methods, we move it into the handler as that seems
like a better fit.
2022-03-18 17:49:32 +00:00
Patrick Cloke
80e0e1f35e
Only fetch thread participation for events with threads. ( #12228 )
...
We fetch the thread summary in two phases:
1. The summary that is shared by all users (count of messages and latest event).
2. Whether the requesting user has participated in the thread.
There's no use in attempting step 2 for events which did not return a summary
from step 1.
2022-03-18 17:15:45 +00:00
Dirk Klimpel
c46065fa3d
Add some type hints to datastore ( #12248 )
...
* inherit `MonthlyActiveUsersStore` from `RegistrationWorkerStore`
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2022-03-18 15:24:18 +00:00
David Robertson
872dbb0181
Correct check_username_for_spam
annotations and docs ( #12246 )
...
* Formally type the UserProfile in user searches
* export UserProfile in synapse.module_api
* Update docs
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2022-03-18 13:51:41 +00:00
Patrick Cloke
3f7cfbc9e5
Merge branch 'release-v1.55' into develop
2022-03-16 12:22:07 -04:00
Patrick Cloke
96274565ff
Fix bundling aggregations if unsigned is not a returned event field. ( #12234 )
...
An error occured if a filter was supplied with `event_fields` which did not include
`unsigned`.
In that case, bundled aggregations are still added as the spec states it is allowed
for servers to add additional fields.
2022-03-16 12:17:39 -04:00
Sean Quah
6121056740
Handle cancellation in DatabasePool.runInteraction()
( #12199 )
...
To handle cancellation, we ensure that `after_callback`s and
`exception_callback`s are always run, since the transaction will
complete on another thread regardless of cancellation.
We also wait until everything is done before releasing the
`CancelledError`, so that logging contexts won't get used after they
have been finished.
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-16 15:07:41 +00:00
Patrick Cloke
fc9bd620ce
Add a relations handler to avoid duplication. ( #12227 )
...
Adds a handler layer between the REST and datastore layers for relations.
2022-03-16 10:39:15 -04:00
Patrick Cloke
c486fa5fd9
Add some missing type hints to cache datastore. ( #12216 )
2022-03-16 10:37:04 -04:00
David Robertson
86965605a4
Fix dead link in spam checker warning ( #12231 )
2022-03-16 13:52:59 +00:00
Patrick Cloke
4587b35929
Clean-up logic for rebasing URLs during URL preview. ( #12219 )
...
By using urljoin from the standard library and reducing the number
of places URLs are rebased.
2022-03-16 07:21:36 -04:00
Patrick Cloke
dda9b7fc4d
Use the ignored_users table to test event visibility & sync. ( #12225 )
...
Instead of fetching the raw account data and re-parsing it. The
ignored_users table is a denormalised version of the account data
for quick searching.
2022-03-15 14:06:05 -04:00
David Robertson
d1130a249b
1.55.0rc1
2022-03-15 11:00:01 +00:00
Sean Quah
2fcf4b3f6c
Add cancellation support to @cached
and @cachedList
decorators ( #12183 )
...
These decorators mostly support cancellation already. Add cancellation
tests and fix use of finished logging contexts by delaying cancellation,
as suggested by @erikjohnston.
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-14 19:04:29 +00:00
Sean Quah
605d161d7d
Add cancellation support to ReadWriteLock
( #12120 )
...
Also convert `ReadWriteLock` to use async context managers.
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-14 18:49:07 +00:00
Sean Quah
8e5706d144
Fix broken background updates when using sqlite with enable_search
off ( #12215 )
...
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-14 17:52:58 +00:00
Sean Quah
90b2327066
Add delay_cancellation
utility function ( #12180 )
...
`delay_cancellation` behaves like `stop_cancellation`, except it
delays `CancelledError`s until the original `Deferred` resolves.
This is handy for unifying cleanup paths and ensuring that uncancelled
coroutines don't use finished logcontexts.
Signed-off-by: Sean Quah <seanq@element.io>
2022-03-14 17:52:15 +00:00
Patrick Cloke
54f674f7a9
Deprecate the groups/communities endpoints and add an experimental configuration flag. ( #12200 )
2022-03-12 13:23:37 -05:00
Shay
ef3619e61d
Add config settings for background update parameters ( #11980 )
2022-03-11 10:46:45 -08:00
Brendan Abolivier
e6a106fd5e
Implement a Jinja2 filter to extract localparts from email addresses ( #12212 )
2022-03-11 15:15:11 +00:00
reivilibre
4a53f35737
Improve code documentation for the typing stream over replication. ( #12211 )
2022-03-11 14:00:15 +00:00
Nick Mills-Barrett
735e89bd3a
Add an additional HTTP pusher + push rule tests. ( #12188 )
...
And rename the field used for caching from _id to _cache_key.
2022-03-11 08:45:26 -05:00
Brendan Abolivier
003cc6910a
Update the SSO username picker template to comply with SIWA guidelines ( #12210 )
...
Fixes https://github.com/matrix-org/synapse/issues/12205
2022-03-11 13:20:00 +00:00
Patrick Cloke
bc9dff1d95
Remove unnecessary pass statements. ( #12206 )
2022-03-11 07:06:21 -05:00
Shay
ed9aea42fa
fix misleading comment in check_events_for_spam
( #12203 )
2022-03-10 09:40:07 -08:00
reivilibre
72e7f1c420
Remove workaround introduced in Synapse v1.50.0rc1 for Mjolnir compatibility. Breaks compatibility with Mjolnir v1.3.1 and earlier. ( #11700 )
2022-03-10 15:53:23 +00:00
Patrick Cloke
ea27528b5d
Support stable identifiers for MSC3440: Threading ( #12151 )
...
The unstable identifiers are still supported if the experimental configuration
flag is enabled. The unstable identifiers will be removed in a future release.
2022-03-10 15:36:13 +00:00