Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Do not include signatures/hashes in make_{join,leave,knock} responses. (#10404) | Patrick Cloke | 2021-07-16 | 1 | -0/+14 |
| | | | | These signatures would end up invalid since the joining/leaving/knocking server would modify the response before calling send_{join,leave,knock}. | ||||
* | Use inline type hints in various other places (in `synapse/`) (#10380) | Jonathan de Jong | 2021-07-15 | 1 | -13/+13 |
| | |||||
* | Correct type hints for synapse.event_auth. (#10253) | Patrick Cloke | 2021-06-30 | 1 | -1/+1 |
| | |||||
* | Add endpoints for backfilling history (MSC2716) (#9247) | Eric Eastwood | 2021-06-22 | 1 | -0/+9 |
| | | | Work on https://github.com/matrix-org/matrix-doc/pull/2716 | ||||
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 1 | -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>` | ||||
* | Bugbear: Add Mutable Parameter fixes (#9682) | Jonathan de Jong | 2021-04-08 | 1 | -4/+10 |
| | | | | | | | Part of #9366 Adds in fixes for B006 and B008, both relating to mutable parameter lint errors. Signed-off-by: Jonathan de Jong <jonathan@automatia.nl> | ||||
* | Prep work for removing `outlier` from `internal_metadata` (#9411) | Richard van der Hoff | 2021-03-17 | 1 | -3/+6 |
| | | | | | | | | | | | | * Populate `internal_metadata.outlier` based on `events` table Rather than relying on `outlier` being in the `internal_metadata` column, populate it based on the `events.outlier` column. * Move `outlier` out of InternalMetadata._dict Ultimately, this will allow us to stop writing it to the database. For now, we have to grandfather it back in so as to maintain compatibility with older versions of Synapse. | ||||
* | Remote dependency on distutils (#9125) | Richard van der Hoff | 2021-01-15 | 1 | -1/+2 |
| | | | | | | | | | `distutils` is pretty much deprecated these days, and replaced with `setuptools`. It's also annoying because it's you can't `pip install` it, and it's hard to figure out which debian package we should depend on to make sure it's there. Since we only use it for a tiny function anyway, let's just vendor said function into our codebase. | ||||
* | Use `%r` rather than `%s` for stringifying events (#8679) | Richard van der Hoff | 2020-10-29 | 1 | -2/+2 |
| | | | | otherwise non-state events get written as `<FrozenEvent ... state_key='None'>` which is indistinguishable from state events with the actual state_key `None`. | ||||
* | Fix typos and spelling errors. (#8639) | Patrick Cloke | 2020-10-23 | 1 | -1/+1 |
| | |||||
* | guard against accidental modification | Richard van der Hoff | 2020-10-13 | 1 | -0/+6 |
| | |||||
* | Remove stream ordering from Metadata dict (#8452) | Richard van der Hoff | 2020-10-05 | 1 | -2/+4 |
| | | | | | | | | There's no need for it to be in the dict as well as the events table. Instead, we store it in a separate attribute in the EventInternalMetadata object, and populate that on load. This means that we can rely on it being correctly populated for any event which has been persited to the database. | ||||
* | Various clean ups to room stream tokens. (#8423) | Erik Johnston | 2020-09-29 | 1 | -3/+3 |
| | |||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 1 | -1/+1 |
| | |||||
* | Add StreamStore to mypy (#8232) | Erik Johnston | 2020-09-02 | 1 | -2/+2 |
| | |||||
* | Be more tolerant of membership events in unknown rooms (#8110) | Richard van der Hoff | 2020-08-20 | 1 | -0/+2 |
| | | | | It turns out that not all out-of-band membership events are labelled as such, so we need to be more accepting here. | ||||
* | Replace iteritems/itervalues/iterkeys with native versions. (#7692) | Patrick Cloke | 2020-06-15 | 1 | -3/+1 |
| | |||||
* | Store room_versions in EventBase objects (#6875) | Richard van der Hoff | 2020-03-05 | 1 | -14/+39 |
| | | | | | | | This is a bit fiddly because it all has to be done on one fell swoop: * Wherever we create a new event, pass in the room version (and check it matches the format version) * When we prune an event, use the room version of the unpruned event to create the pruned version. * When we pass an event over the replication protocol, pass the room version over alongside it, and use it when deserialising the event again. | ||||
* | Rewrite _EventInternalMetadata to back it with a _dict | Richard van der Hoff | 2020-02-14 | 1 | -16/+39 |
| | | | | Mostly, this gives mypy an easier time. | ||||
* | Replace _event_dict_property with DictProperty | Richard van der Hoff | 2020-02-14 | 1 | -65/+79 |
| | | | | | this amounts to the same thing, but replaces `_event_dict` with `_dict`, and removes some of the function layers generated by `property`. | ||||
* | Add a `make_event_from_dict` method (#6858) | Richard van der Hoff | 2020-02-07 | 1 | -2/+14 |
| | | | | | | | ... and use it in places where it's trivial to do so. This will make it easier to pass room versions into the FrozenEvent constructors. | ||||
* | remove unused room_version_to_event_format (#6857) | Richard van der Hoff | 2020-02-07 | 1 | -23/+1 |
| | |||||
* | Add typing to SyncHandler (#6821) | Erik Johnston | 2020-02-03 | 1 | -7/+11 |
| | | | | Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | ||||
* | Type defintions for use in refactoring for redaction changes (#6803) | Richard van der Hoff | 2020-01-30 | 1 | -2/+3 |
| | | | | | | | | | | * Bump signedjson to 1.1 ... so that we can use the type definitions * Fix breakage caused by upgrade to signedjson 1.1 Thanks, @illicitonion... | ||||
* | Make 'event.redacts' never raise. (#6771) | Erik Johnston | 2020-01-23 | 1 | -4/+24 |
| | | | | | | There are quite a few places that we assume that a redaction event has a corresponding `redacts` key, which is not always the case. So lets cheekily make it so that event.redacts just returns None instead. | ||||
* | Remove the ability to query relations when the original event was redacted. ↵ | Andrew Morgan | 2019-07-18 | 1 | -0/+11 |
| | | | | | | | (#5629) Fixes #5594 Forbid viewing relations on an event once it has been redacted. | ||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -17/+13 |
| | |||||
* | Run as background process and fix comments | Erik Johnston | 2019-06-19 | 1 | -1/+1 |
| | |||||
* | Add experimental option to reduce extremities. | Erik Johnston | 2019-06-18 | 1 | -0/+12 |
| | | | | | | | Adds new config option `cleanup_extremities_with_dummy_events` which periodically sends dummy events to rooms with more than 10 extremities. THIS IS REALLY EXPERIMENTAL. | ||||
* | Fix error handling for rooms whose versions are unknown. (#5219) | Richard van der Hoff | 2019-05-21 | 1 | -2/+6 |
| | | | | | | | If we remove support for a particular room version, we should behave more gracefully. This should make client requests fail with a 400 rather than a 500, and will ignore individiual PDUs in a federation transaction, rather than the whole transaction. | ||||
* | Add a test room version which updates event ID format (#5210) | Richard van der Hoff | 2019-05-20 | 1 | -1/+22 |
| | | | Implements MSC1884 | ||||
* | Collect room-version variations into one place (#4969) | Richard van der Hoff | 2019-04-01 | 1 | -10/+5 |
| | | | | 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. | ||||
* | Make `prev_state` field optional | Erik Johnston | 2019-03-08 | 1 | -1/+0 |
| | | | | | | | The `prev_state` field on events is not specced and so synapse shouldn't explode if an event is missing the field. Fixes #4787 | ||||
* | Implement soft fail | Erik Johnston | 2019-03-06 | 1 | -0/+14 |
| | |||||
* | Enable room version v3 | Erik Johnston | 2019-01-29 | 1 | -0/+2 |
| | |||||
* | Fixup comment | Erik Johnston | 2019-01-29 | 1 | -2/+2 |
| | |||||
* | kill vdh test some more | Erik Johnston | 2019-01-29 | 1 | -2/+1 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2019-01-29 | 1 | -16/+94 |
|\ | | | | | | | erikj/redactions_eiah | ||||
| * | Implement event format v2 | Erik Johnston | 2019-01-29 | 1 | -16/+94 |
| | | |||||
* | | Add docstring | Erik Johnston | 2019-01-29 | 1 | -0/+12 |
| | | |||||
* | | Implement rechecking of redactions | Erik Johnston | 2019-01-29 | 1 | -0/+3 |
|/ | |||||
* | Require event format version to parse or create events | Erik Johnston | 2019-01-25 | 1 | -1/+23 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/msc_1813 | Erik Johnston | 2019-01-25 | 1 | -2/+7 |
|\ | |||||
| * | Merge pull request #4405 from matrix-org/erikj/fixup_rejecting_invites | Erik Johnston | 2019-01-24 | 1 | -2/+7 |
| |\ | | | | | | | Store rejected remote invite events as outliers | ||||
| | * | Use term 'out of band membership' instead | Erik Johnston | 2019-01-24 | 1 | -4/+5 |
| | | | |||||
| | * | Clarify the invite flows | Erik Johnston | 2019-01-23 | 1 | -2/+6 |
| | | | |||||
* | | | Review comments | Erik Johnston | 2019-01-24 | 1 | -1/+2 |
| | | | |||||
* | | | Implement MSC 1813 - Add room version to make APIs | Erik Johnston | 2019-01-23 | 1 | -1/+16 |
|/ / | | | | | | | | | We also implement `make_membership_event` converting the returned room version to an event format version. | ||||
* | | isort | Erik Johnston | 2019-01-23 | 1 | -3/+1 |
| | | |||||
* | | Add support for persisting event format versions | Erik Johnston | 2019-01-23 | 1 | -0/+5 |
|/ | | | | | | | | | | | | | | Currently we only have the one event format version defined, but this adds the necessary infrastructure to persist and fetch the format versions alongside the events. We specify the format version rather than the room version as: 1. We don't necessarily know the room version, existing events may be either v1 or v2. 2. We'd need to be careful to prevent/handle correctly if different events in the same room reported to be of different versions, which sounds annoying. | ||||
* | Add helpers for getting prev and auth events (#4139) | Erik Johnston | 2018-11-06 | 1 | -0/+18 |
| | | | | | | | * Add helpers for getting prev and auth events This is in preparation for allowing the event format to change between room versions. | ||||
* | Disable frozen dicts by default (#3987) | Amber Brown | 2018-10-02 | 1 | -3/+10 |
| | |||||
* | Fix handling of redacted events from federation | Erik Johnston | 2018-09-13 | 1 | -0/+5 |
| | | | | | | | | | | If we receive an event that doesn't pass their content hash check (e.g. due to already being redacted) then we hit a bug which causes an exception to be raised, which then promplty stops the event (and request) from being processed. This effects all sorts of federation APIs, including joining rooms with a redacted state event. | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -2/+1 |
| | |||||
* | Consistently use six's iteritems and wrap lazy keys/values in list() if ↵ | Amber Brown | 2018-05-31 | 1 | -1/+1 |
| | | | | they're not meant to be lazy (#3307) | ||||
* | add comment explaining attributeerror | Adrian Tschira | 2018-04-30 | 1 | -0/+3 |
| | |||||
* | Make event properties raise AttributeError instead | Adrian Tschira | 2018-04-15 | 1 | -3/+12 |
| | | | | | | | | | | | | | They raised KeyError before. I'm changing this because the code uses hasattr() to check for the presence of a key. This worked accidentally before, because hasattr() silences all exceptions in python 2. However, in python3, this isn't the case anymore. I had a look around to see if anything depended on this raising a KeyError and I couldn't find anything. Of course, I could have simply missed it. Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | Optimise state resolution | Erik Johnston | 2017-01-17 | 1 | -3/+5 |
| | |||||
* | gah, fix mangled merge of 0.18.7 into develop | Matthew Hodgson | 2017-01-07 | 1 | -1/+1 |
| | |||||
* | Only send events that originate on this server. | Mark Haines | 2017-01-05 | 1 | -0/+9 |
| | | | | | | Or events that are sent via the federation "send_join" API. This should match the behaviour from before v0.18.5 and #1635 landed. | ||||
* | Make None optional | Erik Johnston | 2016-08-26 | 1 | -1/+1 |
| | |||||
* | Remove the is_new_state argument to persist event. | Mark Haines | 2016-03-31 | 1 | -0/+3 |
| | | | | | | | | | Move the checks for whether an event is new state inside persist event itself. This was harder than expected because there wasn't enough information passed to persist event to correctly handle invites from remote servers for new rooms. | ||||
* | Use a stream id generator to assign state group ids | Mark Haines | 2016-03-30 | 1 | -1/+1 |
| | |||||
* | Intern all the things | Erik Johnston | 2016-03-23 | 1 | -9/+2 |
| | |||||
* | Intern sender, event_id and room_id in events | Erik Johnston | 2016-03-23 | 1 | -0/+5 |
| | |||||
* | Intern type and state_key on events | Erik Johnston | 2016-03-23 | 1 | -0/+7 |
| | |||||
* | Don't assume existence of event_id in __str__ | Erik Johnston | 2016-03-18 | 1 | -1/+3 |
| | |||||
* | Make Event objects behave more like dicts | Erik Johnston | 2016-01-18 | 1 | -0/+9 |
| | |||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Fix bug where we didn't correctly serialize the redacted_because key over ↵ | Erik Johnston | 2015-08-21 | 1 | -1/+4 |
| | | | | federation | ||||
* | Don't copy twice | Erik Johnston | 2015-05-29 | 1 | -1/+1 |
| | |||||
* | Add config option to turn off freezing events. Use new encode_json api and ↵ | Erik Johnston | 2015-05-29 | 1 | -1/+10 |
| | | | | ujson.loads | ||||
* | Store the rejected reason in (Frozen)Event structs | Paul "LeoNerd" Evans | 2015-03-25 | 1 | -2/+4 |
| | |||||
* | pyflakes | Erik Johnston | 2015-02-11 | 1 | -1/+1 |
| | |||||
* | Don't unfreeze when using FreezeEvent.get_dict, as we are using a ↵ | Erik Johnston | 2015-02-11 | 1 | -4/+0 |
| | | | | JSONEncoder that understands FrozenDict | ||||
* | Rearrange persist_event so that do all the queries that need to be done ↵ | Erik Johnston | 2015-02-04 | 1 | -1/+1 |
| | | | | before returning early if we have already persisted that event. | ||||
* | Fix bug where we changes in outlier in metadata dict propogated to other events | Erik Johnston | 2015-01-30 | 1 | -1/+1 |
| | |||||
* | Remove unused import | Erik Johnston | 2015-01-07 | 1 | -2/+0 |
| | |||||
* | Optimize FrozenEvent creation | Erik Johnston | 2015-01-06 | 1 | -7/+13 |
| | |||||
* | Update copyright notices | Mark Haines | 2015-01-06 | 1 | -1/+1 |
| | |||||
* | clean up coding style a bit | Mark Haines | 2014-12-16 | 1 | -11/+11 |
| | |||||
* | Persist internal_metadata | Erik Johnston | 2014-12-16 | 1 | -2/+3 |
| | |||||
* | Fix pyflakes | Erik Johnston | 2014-12-15 | 1 | -2/+0 |
| | |||||
* | Use frozenutils | Erik Johnston | 2014-12-15 | 1 | -32/+4 |
| | |||||
* | Finish up upgrade script | Erik Johnston | 2014-12-15 | 1 | -1/+1 |
| | |||||
* | Fix redactions. Fix 'age' key | Erik Johnston | 2014-12-11 | 1 | -0/+1 |
| | |||||
* | Actually fix bug when uploading state with empty state_key | Erik Johnston | 2014-12-10 | 1 | -0/+1 |
| | |||||
* | Fix bug when uploading state with empty state_key | Erik Johnston | 2014-12-10 | 1 | -2/+8 |
| | |||||
* | Fix AttributeError | Erik Johnston | 2014-12-10 | 1 | -0/+3 |
| | |||||
* | Add __str__ to FrozenEvent | Erik Johnston | 2014-12-10 | 1 | -0/+5 |
| | |||||
* | Try and figure out how and why signatures are being changed. | Erik Johnston | 2014-12-10 | 1 | -8/+10 |
| | |||||
* | More bug fixes | Erik Johnston | 2014-12-08 | 1 | -8/+1 |
| | |||||
* | Start making more things use EventContext rather than event.* | Erik Johnston | 2014-12-05 | 1 | -2/+33 |
| | |||||
* | Convert rest and handlers to use new event structure | Erik Johnston | 2014-12-04 | 1 | -4/+4 |
| | |||||
* | Begin converting things to use the new Event structure | Erik Johnston | 2014-12-04 | 1 | -0/+3 |
| | |||||
* | WIP for new way of managing events. | Erik Johnston | 2014-12-03 | 1 | -64/+77 |
| | |||||
* | Begin fleshing out a new Event object | Erik Johnston | 2014-12-02 | 1 | -0/+120 |