Commit graph

20895 commits

Author SHA1 Message Date
Patrick Cloke f03935dcb7 Return thread notification counts down sync. 2022-06-13 14:00:08 -04:00
Patrick Cloke cbbe77f620 Include the thread ID in the event push actions. 2022-06-13 09:57:06 -04:00
Patrick Cloke 3ca9a381ab Add demo script. 2022-06-13 09:57:06 -04:00
Patrick Cloke a8a45921fb Coalesce receipts. 2022-06-13 09:57:06 -04:00
Patrick Cloke 0c395fd8b9 Start splitting receipts on new events. 2022-06-13 09:57:06 -04:00
Patrick Cloke ad6b7cf5c6 Create a forked DAG. 2022-06-13 09:57:06 -04:00
Patrick Cloke 50ba4b34ff Let clients specify prev_event_ids HACKY HACKY HACKY XXX 2022-06-13 09:57:06 -04:00
Patrick Cloke eebc6dfe38 Add test script. 2022-06-13 09:57:05 -04:00
Patrick Cloke 580fbb740f Discard notifications in ranges. 2022-06-13 09:57:05 -04:00
Patrick Cloke 7c320b79bf Use the ranged receipts table when fetching receipts for /sync. 2022-06-13 09:57:05 -04:00
Patrick Cloke f43e0b4b1a Add a ranged receipts table and insert into it. 2022-06-13 09:57:05 -04:00
Patrick Cloke 82166cfa51 Accept an optional starting event ID for the /receipts API. 2022-06-13 09:57:05 -04:00
Patrick Cloke 1ec3885aa9 Accept a start & end event ID when creating a receipt. 2022-06-13 09:57:05 -04:00
Patrick Cloke 48b2d6c9ef Create a separate RangedReadReceipt class. 2022-06-13 09:57:05 -04:00
Patrick Cloke bc7e8a5e60 Pass a Receipt into insert_receipt. 2022-06-13 09:57:05 -04:00
Richard van der Hoff f68b5e5773 Merge branch 'rav/simplify_event_auth_interface' into develop 2022-06-13 11:34:59 +01:00
Richard van der Hoff a6173a16fe changelog 2022-06-12 23:13:10 +01:00
Richard van der Hoff c1b28b8842 Remove redundant room_version param from check_auth_rules_from_context
It's now implied by the room_version property on the event.
2022-06-12 23:13:10 +01:00
Richard van der Hoff 0d9d36b15c Remove room_version param from check_auth_rules_for_event
Instead, use the `room_version` property of the event we're checking.

The `room_version` was originally added as a parameter somewhere around #4482,
but really it's been redundant since #6875 added a `room_version` field to `EventBase`.
2022-06-12 23:13:10 +01:00
Richard van der Hoff 68be42f6b6 Remove room_version param from validate_event_for_room_version
Instead, use the `room_version` property of the event we're validating.

The `room_version` was originally added as a parameter somewhere around #4482,
but really it's been redundant since #6875 added a `room_version` field to `EventBase`.
2022-06-12 23:13:09 +01:00
Richard van der Hoff 2959184a42 EventAuthTestCase: build events for the right room version
In practice, when we run the auth rules, all of the events have the right room
version. Let's stop building Room V1 events for these tests and use the right
version.
2022-06-12 23:13:09 +01:00
David Robertson cfff055fa2
Revert "Changelog"
This reverts commit ae09cc2ee4.

This commit was intended for a different branch.
2022-06-10 19:33:21 +01:00
David Robertson ae09cc2ee4
Changelog 2022-06-10 19:32:40 +01:00
David Robertson 4579445cc5
Add missing TOC link to poetry cheat sheet (#13022)
Missed by #12475.
2022-06-10 15:47:49 +01:00
Patrick Cloke 84cd0fe4e2
Fix-up the contrib/graph scripts. (#13013)
* Clarifies comments and documentation.
* Adds type-hints.
* Fixes Python 3 compatibility (and runs pyupgrade).
* Updates for changes in Synapse internals.
2022-06-10 08:30:14 -04:00
Patrick Cloke 81608490e3
Stop depending on room_id to be returned for children state in the hierarchy response. (#12991)
The `room_id` field was removed from MSC2946 before
it was accepted. It was initially kept for backwards compatibility
and should be removed now that the stable form of the API
is used.

This change only stops Synapse from validating that it is returned,
a future PR will remove returning it as part of the response.
2022-06-10 07:15:51 -04:00
reivilibre 3d1d510fa9
Enable testing against PostgreSQL databases in Complement CI. (#12965) 2022-06-09 14:16:34 +01:00
Patrick Cloke 1df22e16df
Fix example of running complement.sh. (#12990) 2022-06-09 07:21:15 -04:00
Richard van der Hoff 7c6b2204d1
Faster joins: add issue links to the TODOs (#13004)
... to help us keep track of these things
2022-06-09 10:13:03 +00:00
David Robertson 97053c9406
Type annotations for test_v2 (#12985) 2022-06-09 09:48:04 +01:00
Nick Mills-Barrett 04ca3a52f6
Use READ COMMITTED isolation level when inserting read receipts (#12957) 2022-06-09 09:44:16 +01:00
Patrick Cloke dd2d66b0c9
Move the (unstable) dir parameter for /relations behind an experimental flag. (#12984)
MSC3715 defines this parameter, but the unstable version of it should be
behind an experimental flag.
2022-06-08 09:00:35 -04:00
reivilibre 3c8f1290b8
Use a GitHub form for issues rather than a hard-to-read, easy-to-ignore template. (#12982)
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-06-08 11:11:02 +00:00
reivilibre 67f51c84f8
Merge the Complement testing Docker images into a single, multi-purpose image. (#12881)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2022-06-08 09:57:05 +00:00
James c316fe8d4a
Docker Compose Worker Documentation and Examples (#12737) 2022-06-08 10:26:42 +01:00
Sean Quah 3c1c40d843
Clean up the test code for client disconnections (#12929)
* Reword failure message about `await_result=False`
* Use `reactor.advance()` instead of `reactor.pump()`
* Raise `AssertionError`s ourselves
* Un-instance method `_test_disconnect`
* Replace `ThreadedMemoryReactorClock` with `MemoryReactorClock`
2022-06-07 18:17:32 +01:00
David Robertson 586bfc6dc0
Use dummy fallback engines if imports fail (#12979) 2022-06-07 17:33:55 +01:00
Sean Quah a10cc5f824
Test cancellation at every await during request handling (#12674)
* Add tests for `/rooms/<room_id>/members` cancellation.
* Add tests for `/rooms/<room_id>/state` cancellation.

Signed-off-by: Sean Quah <seanq@element.io>
2022-06-07 17:14:47 +01:00
Olivier Wilkinson (reivilibre) 00d915b2a7 Merge branch 'master' into develop 2022-06-07 16:59:41 +01:00
Daniel Aloni b5a3aecf18
Return the same error message from /login when password is incorrect and when account doesn't exist. (#12738) 2022-06-07 14:58:48 +00:00
David Robertson f30bcbd84a
Fix Synapse git info missing in version strings (#12973) 2022-06-07 15:24:11 +01:00
Erik Johnston a7e506ddee
Reduce amount of state we pull out when attempting to send catchup PDUs. (#12963)
* Don't pull out state for catchup

* Newsfile

* Merge newsfile
2022-06-07 14:35:56 +01:00
Olivier Wilkinson (reivilibre) 8a499d7a60 Correct typographical errors in the changelog 2022-06-07 14:22:06 +01:00
Olivier Wilkinson (reivilibre) 495fbf5d63 1.61.0rc1 2022-06-07 13:18:02 +01:00
Patrick Cloke d2fd7f7b5c
Fix a stale comment in get_room_version_id_txn. (#12969) 2022-06-07 07:44:31 -04:00
Patrick Cloke 9dc3293e0b
Consolidate the logic of delete_device/delete_devices. (#12970)
By always using delete_devices and sometimes passing a list
with a single device ID.

Previously these methods had gotten out of sync with each
other and it seems there's little benefit to the single-device
variant.
2022-06-07 07:43:35 -04:00
Olivier Wilkinson (reivilibre) a68dfef1f7 Fix Debian changelog 2022-06-07 12:42:23 +01:00
Andrew Morgan c51f5b9592
Prevent breaking old sqlite's when media retention is enabled (#12977) 2022-06-07 11:28:08 +00:00
Andrew Morgan a47636c570
Prevent local quarantined media from being claimed by media retention (#12972) 2022-06-07 10:53:47 +00:00
Patrick Cloke f7baffd8ec
Remove remaining pieces of groups code. (#12966)
* Remove an unused stream ID generator.
* Remove the now unused remote profile cache.
2022-06-06 13:20:05 -04:00