Tulir Asokan
3b1430bd0b
Merge remote-tracking branch 'upstream/release-v1.77'
2023-02-12 14:02:57 +02:00
Patrick Cloke
1182ae5063
Add helper to parse an enum from query args & use it. ( #14956 )
...
The `parse_enum` helper pulls an enum value from the query string
(by delegating down to the parse_string helper with values generated
from the enum).
This is used to pull out "f" and "b" in most places and then we thread
the resulting Direction enum throughout more code.
2023-02-01 21:35:24 +00:00
Tulir Asokan
53d6ac569d
Merge remote-tracking branch 'upstream/release-v1.74'
2022-12-13 21:15:23 +02:00
David Robertson
b5b5f66084
Move StateFilter
to synapse.types
( #14668 )
...
* Move `StateFilter` to `synapse.types`
* Changelog
2022-12-12 16:19:30 +00:00
David Robertson
93ac3c197e
Suppress empty body warnings in room servelets ( #14600 )
...
* Suppress empty body warnings in room servelets
We've already decided to allow empty bodies for backwards compat. The
change here stops us from emitting a misleading warning; see also
https://github.com/matrix-org/synapse/issues/14478#issuecomment-1319157105
* Changelog
2022-12-05 11:30:41 +00:00
Patrick Cloke
f685318c2a
Use ClientRestResource on both the main process and workers. ( #14528 )
...
Add logic to ClientRestResource to decide whether to mount servlets
or not based on whether the current process is a worker.
This is clearer to see what a worker runs than the completely separate /
copy & pasted list of servlets being mounted for workers.
2022-12-02 13:10:05 -05:00
Tulir Asokan
bb26f5f0a9
Merge remote-tracking branch 'upstream/release-v1.73'
2022-11-29 15:51:33 +02:00
Eric Eastwood
8f10c8b054
Move MSC3030 /timestamp_to_event
endpoint to stable v1 location ( #14471 )
...
Fix https://github.com/matrix-org/synapse/issues/14390
- Client API: `/_matrix/client/unstable/org.matrix.msc3030/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>` -> `/_matrix/client/v1/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>`
- Federation API: `/_matrix/federation/unstable/org.matrix.msc3030/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>` -> `/_matrix/federation/v1/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>`
Complement test changes: https://github.com/matrix-org/complement/pull/559
2022-11-28 15:54:18 -06:00
Tulir Asokan
108a80e9b0
Merge remote-tracking branch 'upstream/release-v1.72'
2022-11-16 17:51:05 +02:00
Brendan Abolivier
86c5a710d8
Implement MSC3912: Relation-based redactions ( #14260 )
...
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2022-11-03 16:21:31 +00:00
Tulir Asokan
c3b3895da4
Merge remote-tracking branch 'upstream/release-v1.70'
2022-10-19 17:24:11 +03:00
Patrick Cloke
126a15794c
Do not allow a None-limit on PaginationConfig. ( #14146 )
...
The callers either set a default limit or manually handle a None-limit
later on (by setting a default value).
Update the callers to always instantiate PaginationConfig with a default
limit and then assume the limit is non-None.
2022-10-14 12:30:05 +00:00
Tulir Asokan
4b94513ae4
Merge remote-tracking branch 'upstream/release-v1.69'
2022-10-04 15:27:39 +03:00
lukasdenk
719488dda8
Add query parameter ts
to allow appservices set the origin_server_ts
for state events. ( #11866 )
...
MSC3316 declares that both /rooms/{roomId}/send and /rooms/{roomId}/state
should accept a ts parameter for appservices. This change expands support
to /state and adds tests.
2022-10-03 13:30:45 +00:00
Tulir Asokan
ca9515d2c7
Merge remote-tracking branch 'upstream/release-v1.67'
2022-09-06 08:22:38 -04:00
Jacek Kuśnierz
84ddcd7bbf
Drop support for calling /_matrix/client/v3/rooms/{roomId}/invite
without an id_access_token
( #13241 )
...
Fixes #13206
Signed-off-by: Jacek Kusnierz jacek.kusnierz@tum.de
2022-08-31 12:10:25 +00:00
reivilibre
7bc110a19e
Generalise the @cancellable
annotation so it can be used on functions other than just servlet methods. ( #13662 )
2022-08-31 11:16:05 +00:00
Tulir Asokan
1167ac5836
Merge remote-tracking branch 'upstream/release-v1.66'
2022-08-23 12:34:07 +03:00
Eric Eastwood
9385c41ba4
Fix Prometheus metrics being negative (mixed up start/end) ( #13584 )
...
Fix:
- https://github.com/matrix-org/synapse/pull/13535#discussion_r949582508
- https://github.com/matrix-org/synapse/pull/13533#discussion_r949577244
2022-08-23 08:47:30 +01:00
Quentin Gliech
3dd175b628
synapse.api.auth.Auth
cleanup: make permission-related methods use Requester
instead of the UserID
(#13024 )
...
Part of #13019
This changes all the permission-related methods to rely on the Requester instead of the UserID. This is a first step towards enabling scoped access tokens at some point, since I expect the Requester to have scope-related informations in it.
It also changes methods which figure out the user/device/appservice out of the access token to return a Requester instead of something else. This avoids having store-related objects in the methods signatures.
2022-08-22 14:17:59 +01:00
Eric Eastwood
2c42673a9b
Add metrics to track /messages
response time by room size ( #13545 )
...
Follow-up to https://github.com/matrix-org/synapse/pull/13533
Part of https://github.com/matrix-org/synapse/issues/13356
2022-08-18 14:15:53 -05:00
Eric Eastwood
2c8cfd6d85
Add specific metric to time long-running /messages
requests ( #13533 )
2022-08-17 10:19:21 +01:00
Tulir Asokan
ba9c553c5e
Merge remote-tracking branch 'upstream/release-v1.62'
2022-06-28 19:31:54 +03:00
Quentin Gliech
c6d6176411
Allow MSC3030 'timestamp_to_event' calls from anyone on world-readable rooms. ( #13062 )
...
Signed-off-by: Quentin Gliech <quenting@element.io>
2022-06-17 11:39:26 +01:00
Tulir Asokan
1543a3643e
Merge remote-tracking branch 'upstream/release-v1.61'
2022-06-14 13:54:26 +03:00
Erik Johnston
e3163e2e11
Reduce the amount of state we pull from the DB ( #12811 )
2022-06-06 09:24:12 +01:00
Patrick Cloke
1885ee0113
Remove unstable APIs for /hierarchy. ( #12851 )
...
Removes the unstable endpoint as well as a duplicated field
which was modified during stabilization.
2022-05-26 07:10:28 -04:00
Tulir Asokan
8975980844
Merge remote-tracking branch 'upstream/release-v1.60'
2022-05-24 14:19:02 +03:00
Tulir Asokan
4d95e65860
Merge remote-tracking branch 'upstream/release-v1.59'
2022-05-18 14:09:18 +03:00
David Robertson
c22314c4e8
Discard null-containing strings before updating the user directory ( #12762 )
2022-05-18 11:40:09 +01:00
David Robertson
d4713d3e33
Discard null-containing strings before updating the user directory ( #12762 )
2022-05-18 11:28:14 +01:00
Sean Quah
bf7ce92bf7
Enable cancellation of GET /members
and GET /state
requests ( #12708 )
...
Enable cancellation of `GET /rooms/$room_id/members`,
`GET /rooms/$room_id/state` and
`GET /rooms/$room_id/state/$state_key/*` requests.
Signed-off-by: Sean Quah <seanq@element.io>
2022-05-11 17:22:34 +01:00
Tulir Asokan
6669e3b670
Merge remote-tracking branch 'upstream/release-v1.58'
2022-04-26 14:40:43 +03:00
Tulir Asokan
90c00fb04b
Revert "Allow room moderators to view redacted event content"
...
This reverts commit 2dc2979af5
.
The feature was merged to upstream, and merging upstream will be cleaner
without this commit here.
2022-04-26 14:40:17 +03:00
Tulir Asokan
4bc8cb4669
Implement MSC2815: allow room moderators to view redacted event content ( #12427 )
...
Implements matrix-org/matrix-spec-proposals#2815
Signed-off-by: Tulir Asokan <tulir@maunium.net>
2022-04-20 12:57:39 +01:00
Richard van der Hoff
b80bb7e452
Fix /room/.../event/...
to return the *original* event after any edits ( #12476 )
...
This is what the MSC (now) requires. Fixes https://github.com/matrix-org/synapse/issues/10310 .
2022-04-19 16:42:19 +01:00
Tulir Asokan
2dc2979af5
Allow room moderators to view redacted event content
...
Cherry-picked from ffcdac4f348ef763843017f7cc46ed63e9285183
2022-04-08 23:39:01 +03:00
Tulir Asokan
ef6a9c8a70
Merge remote-tracking branch 'upstream/release-v1.56'
2022-03-29 13:30:30 +03: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
Tulir Asokan
0b2b774c33
Merge remote-tracking branch 'upstream/release-v1.54'
2022-03-02 13:31:59 +02:00
Patrick Cloke
7754af24ab
Remove the unstable /spaces
endpoint. ( #12073 )
...
...and various code supporting it.
The /spaces endpoint was from an old version of MSC2946 and included
both a Client-Server and Server-Server API. Note that the unstable
/hierarchy endpoint (from the final version of MSC2946) is not yet
removed.
2022-02-28 18:33:00 +00:00
Richard van der Hoff
e24ff8ebe3
Remove HomeServer.get_datastore()
( #12031 )
...
The presence of this method was confusing, and mostly present for backwards
compatibility. Let's get rid of it.
Part of #11733
2022-02-23 11:04:02 +00:00
Tulir Asokan
9870604741
Merge remote-tracking branch 'upstream/release-v1.52'
2022-02-01 14:22:34 +02:00
Patrick Cloke
2897fb6b4f
Improvements to bundling aggregations. ( #11815 )
...
This is some odds and ends found during the review of #11791
and while continuing to work in this code:
* Return attrs classes instead of dictionaries from some methods
to improve type safety.
* Call `get_bundled_aggregations` fewer times.
* Adds a missing assertion in the tests.
* Do not return empty bundled aggregations for an event (preferring
to not include the bundle at all, as the docstring states).
2022-01-26 08:27:04 -05:00
Tulir Asokan
50ad805804
Merge remote-tracking branch 'upstream/release-v1.51'
2022-01-21 15:58:03 +02:00
Patrick Cloke
7a11509d17
Do not try to serialize raw aggregations dict. ( #11791 )
2022-01-21 10:40:34 +00:00
Patrick Cloke
b784299cbc
Do not try to serialize raw aggregations dict. ( #11791 )
2022-01-21 10:31:31 +00:00
Patrick Cloke
68acb0a29d
Include whether the requesting user has participated in a thread. ( #11577 )
...
Per updates to MSC3440.
This is implement as a separate method since it needs to be cached
on a per-user basis, instead of a per-thread basis.
2022-01-18 11:38:57 -05:00
Patrick Cloke
6bf81a7a61
Bundle aggregations outside of the serialization method. ( #11612 )
...
This makes the serialization of events synchronous (and it no
longer access the database), but we must manually calculate and
provide the bundled aggregations.
Overall this should cause no change in behavior, but is prep work
for other improvements.
2022-01-07 09:10:46 -05:00
Tulir Asokan
e9caf56ca0
Merge remote-tracking branch 'upstream/release-v1.50'
2022-01-07 14:21:32 +02:00