Commit Graph

19205 Commits

Author SHA1 Message Date
Callum Brown
6e613a10d0
Display an error page during failure of fallback UIA. (#10561) 2021-08-18 08:13:35 -04:00
Richard van der Hoff
964f29cb6f
Refactor on_receive_pdu code (#10615)
* drop room pdu linearizer sooner

No point holding onto it while we recheck the db

* move out `missing_prevs` calculation

we're going to need `missing_prevs` whatever we do, so we may as well calculate
it eagerly and just update it if it gets outdated.

* Add another `if missing_prevs` condition

this should be a no-op, since all the code inside the block already checks `if
missing_prevs`

* reorder if conditions

This shouldn't change the logic at all.

* Push down `min_depth` read

No point reading it from the database unless we're going to use it.

* Collect the sent_to_us_directly code together

Move the remaining `sent_to_us_directly` code inside the `if
sent_to_us_directly` block.

* Properly separate the `not sent_to_us_directly` branch

Since the only way this second block is now reachable is if we
*didn't* go into the `sent_to_us_directly` branch, we can replace it with a
simple `else`.

* changelog
2021-08-18 12:36:22 +01:00
Patrick Cloke
6a5f8fbcda
Use auto-attribs for attrs classes for sync. (#10630) 2021-08-18 07:27:32 -04:00
Dirk Klimpel
430241a1e9
Remove deprecated Shutdown Room and Purge Room Admin API (#8830) 2021-08-17 21:19:13 +01:00
Azrenbeth
1a9f531c79
Port the PresenceRouter module interface to the new generic interface (#10524)
Port the PresenceRouter module interface to the new generic interface introduced in v1.37.0
2021-08-17 13:22:45 +00:00
Richard van der Hoff
272b89d547
Stop setting the outlier flag for things that aren't (#10614)
Marking things as outliers to inhibit pushes is a sledgehammer to crack a
nut. Move the test further down the stack so that we just inhibit the thing we
want.
2021-08-17 13:13:42 +01:00
reivilibre
642a42edde
Flatten the synapse.rest.client package (#10600) 2021-08-17 11:57:58 +00:00
Andrew Morgan
b62eba7705
Always list fallback key types in /sync (#10623) 2021-08-17 12:32:25 +01:00
Dirk Klimpel
3bcd525b46
Allow to edit external_ids by Edit User admin API (#10598)
Signed-off-by: Dirk Klimpel dirk@klimpel.org
2021-08-17 11:56:11 +01:00
Richard van der Hoff
58f0d97275
update links to schema doc (#10620) 2021-08-17 10:45:35 +00:00
Brendan Abolivier
ae2714c1f3
Allow using several custom template directories (#10587)
Allow using several directories in read_templates.
2021-08-17 10:23:14 +00:00
Will Hunt
a933c2c7d8
Add an admin API to check if a username is available (#10578)
This adds a new API GET /_synapse/admin/v1/username_available?username=foo to check if a username is available. It is the counterpart to https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-register-available, except that it works even if registration is disabled.
2021-08-17 10:52:38 +01:00
reivilibre
19e51b14d2
Manhole: wrap coroutines in defer.ensureDeferred automatically (#10602) 2021-08-16 18:11:48 +01:00
reivilibre
0db8cab72c
Update CONTRIBUTING.md to fix index links and SyTest instructions (#10599)
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
2021-08-16 18:09:47 +01:00
Patrick Cloke
5af83efe8d
Validate the max_rooms_per_space parameter to ensure it is non-negative. (#10611) 2021-08-16 12:01:30 -04:00
Michael Telatynski
0ace38b7b3
Experimental support for MSC3266 Room Summary API. (#10394) 2021-08-16 14:49:12 +00:00
Patrick Cloke
87b62f8bb2
Split synapse.federation.transport.server into multiple files. (#10590) 2021-08-16 10:14:31 -04:00
Richard van der Hoff
2d9ca4ca77
Clean up some logging in the federation event handler (#10591)
* Include outlier status in `str(event)`

In places where we log event objects, knowing whether or not you're dealing
with an outlier is super useful.

* Remove duplicated logging in get_missing_events

When we process events received from get_missing_events, we log them twice
(once in `_get_missing_events_for_pdu`, and once in `on_receive_pdu`). Reduce
the duplication by removing the logging in `on_receive_pdu`, and ensuring the
call sites do sensible logging.

* log in `on_receive_pdu` when we already have the event

* Log which prev_events we are missing

* changelog
2021-08-16 13:19:02 +01:00
Patrick Cloke
7de445161f
Support federation in the new spaces summary API (MSC2946). (#10569) 2021-08-16 08:06:17 -04:00
Šimon Brandner
a3a7514570
Handle string read receipt data (#10606)
* Handle string read receipt data

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Test that we handle string read receipt data

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Add changelog for #10606

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Add docs

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Ignore malformed RRs

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Only surround hidden = ...

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Remove unnecessary argument

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Update changelog.d/10606.bugfix

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2021-08-16 12:22:38 +01:00
Brendan Abolivier
d1f43b731c
Update the Synapse Grafana dashboard (#10570) 2021-08-16 12:57:09 +02:00
Eric Eastwood
c8d54be44c
Move /batch_send to /v2_alpha directory (MSC2716) (#10576)
* Move /batch_send to /v2_alpha directory

As pointed out by @erikjohnston,
https://github.com/matrix-org/synapse/pull/10552#discussion_r685836624
2021-08-13 14:37:24 -05:00
Patrick Cloke
c12b5577f2
Fix a harmless exception when the staged events queue is empty. (#10592) 2021-08-13 11:49:06 +00:00
David Robertson
d2ad397d3c
Stop building a debian package for Groovy Gorilla (#10588) 2021-08-12 16:50:18 +01:00
David Robertson
4a76d01ff7
Merge pull request #10573 from DMRobertson/dmr/goodbye-buildkite
Remove references to BuildKite in favour of GitHub Actions
2021-08-12 13:05:23 +01:00
David Robertson
878528913d Remove buildkite-era comment 2021-08-12 11:48:36 +01:00
David Robertson
74fcd5aab9 portdb also uses coverage, so provide $TOP there 2021-08-12 10:41:01 +01:00
David Robertson
314a739160 Also rename in lint.sh 2021-08-12 10:40:44 +01:00
Patrick Cloke
98a3355d9a
Update the pagination parameter name based on MSC2946 review. (#10579) 2021-08-11 15:44:45 -04:00
Dirk Klimpel
915b37e5ef
Admin API to delete media for a specific user (#10558) 2021-08-11 19:29:59 +00:00
David Robertson
92a8e68ba2 Missed another ci->.ci
Should have been more systematic with my grepping.
2021-08-11 20:19:56 +01:00
David Robertson
cb5976ebd7 set TOP in sytest containers 2021-08-11 20:08:48 +01:00
David Robertson
6fcc3e0bc8 Teach MANIFEST and tox about ci->.ci 2021-08-11 20:08:14 +01:00
Patrick Cloke
3ebb6694f0
Allow requesting the summary of a space which is joinable. (#10580)
As opposed to only allowing the summary of spaces which the user is
already in or has world-readable visibility.

This makes the logic consistent with whether a space/room is returned
as part of a space and whether a space summary can start at a space.
2021-08-11 15:04:51 -04:00
David Robertson
33ef86aa25 Rename ci to .ci 2021-08-11 19:59:57 +01:00
Patrick Cloke
5acd8b5a96
Expire old spaces summary pagination sessions. (#10574) 2021-08-11 18:52:09 +00:00
Patrick Cloke
2ae2a04616
Clarify error message when joining a restricted room. (#10572) 2021-08-11 14:31:39 -04:00
Patrick Cloke
fab352ac2c
Fix type hints in space summary tests. (#10575)
And ensure that the file is checked via mypy.
2021-08-11 10:43:40 -04:00
Dirk Klimpel
339c3918e1
support federation queries through http connect proxy (#10475)
Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu>
Signed-off-by: Dirk Klimpel dirk@klimpel.org
2021-08-11 15:34:59 +01:00
Eric Eastwood
8c654b7309
Only return state events that the AS passed in via state_events_at_start (MSC2716) (#10552)
* Only return state events that the AS passed in via state_events_at_start

As discovered by @Half-Shot in
https://github.com/matrix-org/matrix-doc/pull/2716#discussion_r684158448

Part of MSC2716

* Add changelog

* Fix changelog extension
2021-08-10 18:10:40 -05:00
David Robertson
b924a5c2e4 Add changelog entry and signoff
Signed-off-by: David Robertson <david.m.robertson1@gmail.com>
2021-08-10 18:37:40 +01:00
Patrick Cloke
fe1d0c8618
Add local support for the new spaces summary endpoint (MSC2946) (#10549)
This adds support for the /hierarchy endpoint, which is an
update to MSC2946. Currently this only supports rooms known
locally to the homeserver.
2021-08-10 13:08:17 -04:00
David Robertson
c0ebdfc77e Kill off the .buildkite dir completely 2021-08-10 16:38:13 +01:00
David Robertson
58e5da5aa0 Remove buildkite from portdb CI tests 2021-08-10 16:38:13 +01:00
David Robertson
c5988a8eb7 Remove unused BUILDKITE_BRANCH env var 2021-08-10 16:38:13 +01:00
David Robertson
3d67b8c82b Move sytest worker-blacklist to ci directory 2021-08-10 16:38:13 +01:00
David Robertson
03fb99a5c8 check-newsfragment: pass pr number explicitly
use PULL_REQUEST_NUMBER instead of BUILDKITE_PULL_REQUEST
remove the other user of BUILDKITE_PULL_REQUEST, namely merge_base_branch.sh
2021-08-10 16:38:13 +01:00
David Robertson
8da9e3cb69 Move test_old_deps.sh to new ci dir 2021-08-10 16:38:13 +01:00
Patrick Cloke
691593bf71
Fix an edge-case with invited rooms over federation in the spaces summary. (#10560)
If a room which the requesting user was invited to was queried over
federation it will now properly appear in the spaces summary (instead
of being stripped out by the requesting server).
2021-08-10 14:56:54 +00:00
Hillery Shay
52bfa2d59a
Update contributing.md to warn against rebasing an open PR. (#10563)
Signed-off-by: H.Shay <shaysquared@gmail.com>
2021-08-10 13:35:54 +00:00