summary refs log tree commit diff
path: root/synapse/api/room_versions.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename MSC2716 things from `chunk` to `batch` to match `/batch_send` ↵Eric Eastwood2021-09-211-19/+3
| | | | | | | | endpoint (#10838) See https://github.com/matrix-org/matrix-doc/pull/2716#discussion_r684574497 Dropping support for older MSC2716 room versions so we don't have to worry about supporting both chunk and batch events.
* Prefer room v9 for restricted rooms. (#10772)Patrick Cloke2021-09-091-1/+1
| | | | | Hint to clients via the room capabilities API (MSC3244) that room version 9 should be preferred for creating a room with restricted join rules (instead of room version 8).
* Support MSC3375: room version 9. (#10747)Patrick Cloke2021-09-031-0/+31
|
* Set room version 8 as preferred for restricted rooms. (#10571)Patrick Cloke2021-08-201-1/+1
|
* When redacting, keep event fields around that maintain the historical event ↵Eric Eastwood2021-08-091-5/+32
| | | | | | | | | | | | | | | structure intact (MSC2716) (#10538) * Keep event fields that maintain the historical event structure intact Fix https://github.com/matrix-org/synapse/issues/10521 * Add changelog * Bump room version * Better changelog text * Fix up room version after develop merge
* Support MSC3289: Room version 8 (#10449)Patrick Cloke2021-08-091-14/+14
| | | This adds support for MSC3289: room version 8. This is room version 7 + MSC3083.
* Make historical events discoverable from backfill for servers without any ↵Eric Eastwood2021-07-281-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scrollback history (MSC2716) (#10245) * Make historical messages available to federated servers Part of MSC2716: https://github.com/matrix-org/matrix-doc/pull/2716 Follow-up to https://github.com/matrix-org/synapse/pull/9247 * Debug message not available on federation * Add base starting insertion point when no chunk ID is provided * Fix messages from multiple senders in historical chunk Follow-up to https://github.com/matrix-org/synapse/pull/9247 Part of MSC2716: https://github.com/matrix-org/matrix-doc/pull/2716 --- Previously, Synapse would throw a 403, `Cannot force another user to join.`, because we were trying to use `?user_id` from a single virtual user which did not match with messages from other users in the chunk. * Remove debug lines * Messing with selecting insertion event extremeties * Move db schema change to new version * Add more better comments * Make a fake requester with just what we need See https://github.com/matrix-org/synapse/pull/10276#discussion_r660999080 * Store insertion events in table * Make base insertion event float off on its own See https://github.com/matrix-org/synapse/pull/10250#issuecomment-875711889 Conflicts: synapse/rest/client/v1/room.py * Validate that the app service can actually control the given user See https://github.com/matrix-org/synapse/pull/10276#issuecomment-876316455 Conflicts: synapse/rest/client/v1/room.py * Add some better comments on what we're trying to check for * Continue debugging * Share validation logic * Add inserted historical messages to /backfill response * Remove debug sql queries * Some marker event implemntation trials * Clean up PR * Rename insertion_event_id to just event_id * Add some better sql comments * More accurate description * Add changelog * Make it clear what MSC the change is part of * Add more detail on which insertion event came through * Address review and improve sql queries * Only use event_id as unique constraint * Fix test case where insertion event is already in the normal DAG * Remove debug changes * Switch to chunk events so we can auth via power_levels Previously, we were using `content.chunk_id` to connect one chunk to another. But these events can be from any `sender` and we can't tell who should be able to send historical events. We know we only want the application service to do it but these events have the sender of a real historical message, not the application service user ID as the sender. Other federated homeservers also have no indicator which senders are an application service on the originating homeserver. So we want to auth all of the MSC2716 events via power_levels and have them be sent by the application service with proper PL levels in the room. * Switch to chunk events for federation * Add unstable room version to support new historical PL * Fix federated events being rejected for no state_groups Add fix from https://github.com/matrix-org/synapse/pull/10439 until it merges. * Only connect base insertion event to prev_event_ids Per discussion with @erikjohnston, https://matrix.to/#/!UytJQHLQYfvYWsGrGY:jki.re/$12bTUiObDFdHLAYtT7E-BvYRp3k_xv8w0dUQHibasJk?via=jki.re&via=matrix.org * Make it possible to get the room_version with txn * Allow but ignore historical events in unsupported room version See https://github.com/matrix-org/synapse/pull/10245#discussion_r675592489 We can't reject historical events on unsupported room versions because homeservers without knowledge of MSC2716 or the new room version don't reject historical events either. Since we can't rely on the auth check here to stop historical events on unsupported room versions, I've added some additional checks in the processing/persisting code (`synapse/storage/databases/main/events.py` -> `_handle_insertion_event` and `_handle_chunk_event`). I've had to do some refactoring so there is method to fetch the room version by `txn`. * Move to unique index syntax See https://github.com/matrix-org/synapse/pull/10245#discussion_r675638509 * High-level document how the insertion->chunk lookup works * Remove create_event fallback for room_versions See https://github.com/matrix-org/synapse/pull/10245/files#r677641879 * Use updated method name
* Update the MSC3083 support to verify if joins are from an authorized server. ↵Patrick Cloke2021-07-261-1/+1
| | | | (#10254)
* MSC3244 room capabilities implementation (#10283)Michael Telatynski2021-07-201-2/+36
|
* Use inline type hints in various other places (in `synapse/`) (#10380)Jonathan de Jong2021-07-151-2/+2
|
* Remove the experimental flag for knocking and use stable prefixes / ↵Patrick Cloke2021-06-151-3/+4
| | | | | | | endpoints. (#10167) * Room version 7 for knocking. * Stable prefixes and endpoints (both client and federation) for knocking. * Removes the experimental configuration flag.
* Implement knock feature (#6739)Sorunome2021-06-091-1/+26
| | | | | | This PR aims to implement the knock feature as proposed in https://github.com/matrix-org/matrix-doc/pull/2403 Signed-off-by: Sorunome mail@sorunome.de Signed-off-by: Andrew Morgan andrewm@element.io
* Remove the experimental spaces enabled flag. (#10063)Patrick Cloke2021-05-261-1/+1
| | | | In lieu of just always enabling the unstable spaces endpoint and unstable room version.
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Add an experimental room version to support restricted join rules. (#9717)Patrick Cloke2021-03-311-1/+23
| | | Per MSC3083.
* Implement MSC2176: Updated redaction rules (#8984)Patrick Cloke2021-01-051-6/+26
| | | | An experimental room version ("org.matrix.msc2176") contains the new redaction rules for testing.
* Stop sub-classing object (#8249)Patrick Cloke2020-09-041-5/+5
|
* Implement room version 6 (MSC2240). (#7506)Patrick Cloke2020-05-151-26/+4
|
* Strictly enforce canonicaljson requirements in a new room version (#7381)Patrick Cloke2020-05-141-1/+23
|
* Enforce MSC2209: auth rules for notifications in power level event (#7502)Patrick Cloke2020-05-141-1/+21
| | | | In a new room version, the "notifications" key of power level events are subject to restricted auth rules.
* Remove special auth and redaction rules for aliases events in experimental ↵Patrick Cloke2020-03-091-4/+5
| | | | room ver. (#7037)
* Implement updated auth rules from MSC2260Richard van der Hoff2020-01-281-0/+16
|
* Fix up some typechecking (#6150)Amber Brown2019-10-021-1/+4
| | | | | | * type checking fixes * changelog
* Run Black. (#5482)Amber Brown2019-06-201-11/+14
|
* Implement room v5 which enforces signing key validityRichard van der Hoff2019-06-051-5/+5
| | | | | Implements [MSC2077](https://github.com/matrix-org/matrix-doc/pull/2077) and fixes #5247 and #4364.
* Add a test room version where we enforce key validity (#5348)Richard van der Hoff2019-06-051-7/+13
|
* Add config option for setting homeserver's default room version (#5223)Andrew Morgan2019-05-231-4/+0
| | | | | Replaces DEFAULT_ROOM_VERSION constant with a method that first checks the config, then returns a hardcoded value if the option is not present. That hardcoded value is now located in the server.py config file.
* Introduce room v4 which updates event ID format. (#5217)Richard van der Hoff2019-05-211-4/+4
| | | Implements https://github.com/matrix-org/matrix-doc/pull/2002.
* Add a test room version which updates event ID format (#5210)Richard van der Hoff2019-05-201-2/+11
| | | Implements MSC1884
* Collect room-version variations into one place (#4969)Richard van der Hoff2019-04-011-0/+91
Collect all the things that make room-versions different to one another into one place, so that it's easier to define new room versions.