Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge pull request #8537 from matrix-org/rav/simplify_locally_reject_invite | Richard van der Hoff | 2020-10-15 | 1 | -8/+13 |
|\ | | | | | Simplify `_locally_reject_invite` | ||||
| * | Simplify `_locally_reject_invite` | Richard van der Hoff | 2020-10-13 | 1 | -8/+13 |
| | | | | | | | | | | Update `EventCreationHandler.create_event` to accept an auth_events param, and use it in `_locally_reject_invite` instead of reinventing the wheel. | ||||
* | | Make sure a retention policy is a state event (#8527) | Brendan Abolivier | 2020-10-14 | 1 | -0/+3 |
|/ | | | | | * Make sure a retention policy is a state event * Changelog | ||||
* | Combine `SpamCheckerApi` with the more generic `ModuleApi`. (#8464) | Richard van der Hoff | 2020-10-07 | 2 | -4/+4 |
| | | | | | Lots of different module apis is not easy to maintain. Rather than adding yet another ModuleApi(hs, hs.get_auth_handler()) incantation, first add an hs.get_module_api() method and use it where possible. | ||||
* | Additional tests for third-party event rules (#8468) | Richard van der Hoff | 2020-10-06 | 1 | -5/+7 |
| | | | | | | | | | * Optimise and test state fetching for 3p event rules Getting all the events at once is much more efficient than getting them individually * Test that 3p event rules can modify events | ||||
* | Fix third-party event modules for `check_visibility_can_be_modified` check | Richard van der Hoff | 2020-10-05 | 1 | -1/+3 |
| | | | | | | PR #8292 tried to maintain backwards compat with modules which don't provide a `check_visibility_can_be_modified` method, but the tests weren't being run, and the check didn't work. | ||||
* | Allow ThirdPartyEventRules modules to manipulate public room state (#8292) | Andrew Morgan | 2020-10-05 | 1 | -6/+45 |
| | | | | | This PR allows `ThirdPartyEventRules` modules to view, manipulate and block changes to the state of whether a room is published in the public rooms directory. While the idea of whether a room is in the public rooms list is not kept within an event in the room, `ThirdPartyEventRules` generally deal with controlling which modifications can happen to a room. Public rooms fits within that idea, even if its toggle state isn't controlled through a state event. | ||||
* | Remove stream ordering from Metadata dict (#8452) | Richard van der Hoff | 2020-10-05 | 2 | -2/+9 |
| | | | | | | | | 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 | 6 | -7/+7 |
| | |||||
* | Add StreamStore to mypy (#8232) | Erik Johnston | 2020-09-02 | 1 | -2/+2 |
| | |||||
* | Convert additional databases to async/await part 2 (#8200) | Patrick Cloke | 2020-09-01 | 1 | -7/+12 |
| | |||||
* | Allow capping a room's retention policy (#8104) | Brendan Abolivier | 2020-08-24 | 1 | -56/+3 |
| | |||||
* | Allow denying or shadow banning registrations via the spam checker (#8034) | Patrick Cloke | 2020-08-20 | 1 | -2/+33 |
| | |||||
* | 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. | ||||
* | Add type hints to handlers.message and events.builder (#8067) | Erik Johnston | 2020-08-12 | 1 | -27/+31 |
| | |||||
* | Convert synapse.api to async/await (#8031) | Patrick Cloke | 2020-08-06 | 1 | -1/+1 |
| | |||||
* | Rename database classes to make some sense (#8033) | Erik Johnston | 2020-08-05 | 1 | -1/+1 |
| | |||||
* | Convert a synapse.events to async/await. (#7949) | Patrick Cloke | 2020-07-27 | 4 | -68/+67 |
| | |||||
* | Convert state resolution to async/await (#7942) | Patrick Cloke | 2020-07-24 | 1 | -2/+2 |
| | |||||
* | Fix deprecation warning: import ABC from collections.abc (#7892) | Karthikeyan Singaravelan | 2020-07-20 | 1 | -3/+3 |
| | |||||
* | Add `HomeServer.signing_key` property (#7805) | Richard van der Hoff | 2020-07-08 | 1 | -1/+1 |
| | | | ... instead of duplicating `config.signing_key[0]` everywhere | ||||
* | Replace all remaining six usage with native Python 3 equivalents (#7704) | Dagfinn Ilmari Mannsåker | 2020-06-16 | 2 | -10/+6 |
| | |||||
* | Replace iteritems/itervalues/iterkeys with native versions. (#7692) | Patrick Cloke | 2020-06-15 | 2 | -6/+2 |
| | |||||
* | Strictly enforce canonicaljson requirements in a new room version (#7381) | Patrick Cloke | 2020-05-14 | 2 | -1/+41 |
| | |||||
* | Extend spam checker to allow for multiple modules (#7435) | Andrew Morgan | 2020-05-08 | 1 | -39/+39 |
| | |||||
* | Fix bug in EventContext.deserialize. (#7393) | Erik Johnston | 2020-05-05 | 1 | -2/+5 |
| | | | | This caused `prev_state_ids` to be incorrect if the state event was not replacing an existing state entry. | ||||
* | Remove special auth and redaction rules for aliases events in experimental ↵ | Patrick Cloke | 2020-03-09 | 1 | -7/+5 |
| | | | | room ver. (#7037) | ||||
* | Store room_versions in EventBase objects (#6875) | Richard van der Hoff | 2020-03-05 | 2 | -24/+43 |
| | | | | | | | 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. | ||||
* | Merge pull request #6872 from matrix-org/rav/dictproperty | Richard van der Hoff | 2020-02-18 | 1 | -81/+118 |
|\ | | | | | Rewrite _EventInternalMetadata to back it with a dict | ||||
| * | 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 type hints to the spam check module (#6915) | Patrick Cloke | 2020-02-14 | 1 | -18/+26 |
|/ | | | | Add typing information to the spam checker modules. | ||||
* | Filter the results of user directory searching via the spam checker (#6888) | Patrick Cloke | 2020-02-14 | 1 | -0/+27 |
| | | | Add a method to the spam checker to filter the user directory results. | ||||
* | Add a `make_event_from_dict` method (#6858) | Richard van der Hoff | 2020-02-07 | 2 | -9/+17 |
| | | | | | | | ... 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 |
| | |||||
* | Third party event rules Update (#6781) | PeerD | 2020-02-06 | 1 | -3/+4 |
| | |||||
* | 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> | ||||
* | Pass room_version into add_hashes_and_signatures | Richard van der Hoff | 2020-01-30 | 1 | -1/+1 |
| | |||||
* | Pass room_version into create_local_event_from_event_dict | Richard van der Hoff | 2020-01-30 | 1 | -22/+18 |
| | |||||
* | Store the room version in EventBuilder | Richard van der Hoff | 2020-01-30 | 1 | -5/+7 |
| | |||||
* | 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... | ||||
* | Set the PL for aliases events to 0. | Richard van der Hoff | 2020-01-29 | 1 | -1/+1 |
| | |||||
* | Factor out a `copy_power_levels_contents` method | Richard van der Hoff | 2020-01-29 | 1 | -1/+36 |
| | | | | I'm going to need another copy (hah!) of this. | ||||
* | 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. | ||||
* | Add StateMap type alias (#6715) | Erik Johnston | 2020-01-16 | 1 | -6/+5 |
| | |||||
* | Change EventContext to use the Storage class (#6564) | Erik Johnston | 2019-12-20 | 2 | -16/+22 |
| | |||||
* | Merge branch 'develop' into babolivier/message_retention | Brendan Abolivier | 2019-11-26 | 1 | -30/+129 |
|\ | |||||
| * | Fix bug which caused rejected events to be stored with the wrong room state ↵ | Richard van der Hoff | 2019-11-06 | 1 | -2/+23 |
| | | | | | | | | | | | | | | | | | | | | | | | | (#6320) Fixes a bug where rejected events were persisted with the wrong state group. Also fixes an occasional internal-server-error when receiving events over federation which are rejected and (possibly because they are backwards-extremities) have no prev_group. Fixes #6289. | ||||
| * | Add some checks that we aren't using state from rejected events (#6330) | Richard van der Hoff | 2019-11-05 | 1 | -5/+44 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Raise an exception if accessing state for rejected events Add some sanity checks on accessing state_group etc for rejected events. * Skip calculating push actions for rejected events It didn't actually cause any bugs, because rejected events get filtered out at various later points, but there's not point in trying to calculate the push actions for a rejected event. | ||||
| * | Improve documentation for EventContext fields (#6319) | Richard van der Hoff | 2019-11-05 | 1 | -26/+65 |
| | | |||||
* | | Implement per-room message retention policies | Brendan Abolivier | 2019-11-04 | 1 | -3/+97 |
|/ | |||||
* | Factor out an _AsyncEventContextImpl (#6298) | Richard van der Hoff | 2019-11-01 | 1 | -65/+42 |
| | | | | | | The intention here is to make it clearer which fields we can expect to be populated when: notably, that the _event_type etc aren't used for the synchronous impl of EventContext. | ||||
* | Expose some homeserver functionality to spam checkers (#6259) | Travis Ralston | 2019-10-31 | 1 | -1/+13 |
| | | | | | | | | | | | | | | * Offer the homeserver instance to the spam checker * Newsfile * Linting * Expose a Spam Checker API instead of passing the homeserver object * Alter changelog * s/hs/api | ||||
* | Convert EventContext to attrs (#6218) | Richard van der Hoff | 2019-10-28 | 1 | -61/+39 |
| | | | | * make EventContext use an attr | ||||
* | Merge pull request #5805 from matrix-org/erikj/validate_state | Erik Johnston | 2019-08-01 | 1 | -2/+9 |
|\ | | | | | Validate well known state events are state events. | ||||
| * | Validate well-known state events are state events. | Erik Johnston | 2019-07-31 | 1 | -2/+9 |
| | | | | | | | | | | Lets disallow sending things like memberships, topics etc as non-state events. | ||||
* | | Fix spelling. | Erik Johnston | 2019-08-01 | 1 | -1/+3 |
|/ | | | | Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | ||||
* | Don't allow clients to send tombstones that reference the same room | Erik Johnston | 2019-07-31 | 1 | -0/+7 |
| | |||||
* | Replace returnValue with return (#5736) | Amber Brown | 2019-07-23 | 4 | -30/+26 |
| | |||||
* | Remove the ability to query relations when the original event was redacted. ↵ | Andrew Morgan | 2019-07-18 | 2 | -4/+23 |
| | | | | | | | (#5629) Fixes #5594 Forbid viewing relations on an event once it has been redacted. | ||||
* | Add origin_server_ts and sender fields to m.replace (#5613) | Andrew Morgan | 2019-07-05 | 1 | -1/+5 |
| | | | | | Riot team would like some extra fields as part of m.replace, so here you go. Fixes: #5598 | ||||
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 1 | -1/+1 |
| | |||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 7 | -106/+98 |
| | |||||
* | Merge pull request #5480 from matrix-org/erikj/extremities_dummy_events | Erik Johnston | 2019-06-19 | 1 | -0/+12 |
|\ | | | | | Add experimental option to reduce extremities. | ||||
| * | 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. | ||||
* | | Make check_threepid_can_be_invited async | Brendan Abolivier | 2019-06-17 | 1 | -0/+1 |
| | | |||||
* | | Add third party rules hook for 3PID invites | Brendan Abolivier | 2019-06-17 | 1 | -1/+31 |
| | | |||||
* | | Add third party rules hook into create room | Erik Johnston | 2019-06-17 | 1 | -3/+24 |
|/ | |||||
* | Add plugin APIs for implementations of custom event rules. | Brendan Abolivier | 2019-06-14 | 1 | -0/+62 |
| | |||||
* | Fix appservice timestamp massaging (#5233) | Tulir Asokan | 2019-05-24 | 1 | -1/+6 |
| | | | Signed-off-by: Tulir Asokan <tulir@maunium.net> | ||||
* | Don't bundle events in /sync or /events | Erik Johnston | 2019-05-21 | 1 | -2/+3 |
| | | | | | As we'll send down the annotations too anyway, so this just ends up confusing clients. | ||||
* | Fix error handling for rooms whose versions are unknown. (#5219) | Richard van der Hoff | 2019-05-21 | 2 | -5/+9 |
| | | | | | | | 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 | ||||
* | Rename relation types to match MSC | Erik Johnston | 2019-05-20 | 1 | -3/+3 |
| | |||||
* | Fixup bsaed on review comments | Erik Johnston | 2019-05-17 | 1 | -3/+1 |
| | |||||
* | Add basic editing support | Erik Johnston | 2019-05-16 | 1 | -4/+26 |
| | |||||
* | Add aggregations API | Erik Johnston | 2019-05-16 | 1 | -3/+31 |
| | |||||
* | Allow client event serialization to be async | Erik Johnston | 2019-05-14 | 1 | -0/+44 |
| | |||||
* | Do checks on aliases for incoming m.room.aliases events (#5128) | Brendan Abolivier | 2019-05-08 | 2 | -4/+19 |
| | | | | | Follow-up to #5124 Also added a bunch of checks to make sure everything (both the stuff added on #5124 and this PR) works as intended. | ||||
* | Remove periods from copyright headers (#5046) | Andrew Morgan | 2019-04-11 | 1 | -1/+1 |
| | |||||
* | Collect room-version variations into one place (#4969) | Richard van der Hoff | 2019-04-01 | 3 | -25/+29 |
| | | | | 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 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2019-01-29 | 1 | -2/+3 |
|\ | | | | | | | erikj/redactions_eiah | ||||
| * | Merge pull request #4514 from matrix-org/erikj/remove_event_id | Erik Johnston | 2019-01-29 | 1 | -2/+3 |
| |\ | | | | | | | Remove usages of event ID's domain | ||||
| | * | Don't assert an event must have an event ID | Erik Johnston | 2019-01-29 | 1 | -2/+3 |
| | | | |||||
* | | | 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 | 3 | -79/+320 |
|\| | | | | | | | | | | | erikj/redactions_eiah | ||||
| * | | Implement event format v2 | Erik Johnston | 2019-01-29 | 3 | -19/+106 |
| |/ | |||||
| * | Don't set event_id twice | Erik Johnston | 2019-01-29 | 1 | -2/+0 |
| | | |||||
| * | Refactor event building into EventBuilder | Erik Johnston | 2019-01-29 | 1 | -65/+219 |
| | | | | | | | | | | This is so that everything is done in one place, making it easier to change the event format based on room version | ||||
* | | Drop vdh support | Erik Johnston | 2019-01-29 | 1 | -2/+0 |
| | | |||||
* | | Add docstring | Erik Johnston | 2019-01-29 | 1 | -0/+12 |
| | | |||||
* | | Implement rechecking of redactions | Erik Johnston | 2019-01-29 | 1 | -0/+3 |
|/ | |||||
* | Merge pull request #4494 from matrix-org/erikj/fixup_event_validator | Erik Johnston | 2019-01-29 | 1 | -23/+37 |
|\ | | | | | Split up event validation between event and builder | ||||
| * | Remove duplicate checks | Erik Johnston | 2019-01-29 | 1 | -14/+0 |
| | | |||||
| * | Fix up error messages | Erik Johnston | 2019-01-29 | 1 | -2/+2 |
| | | |||||
| * | Fold validate into validate_new | Erik Johnston | 2019-01-29 | 1 | -16/+11 |
| | | |||||
| * | Split up event validation between event and builder | Erik Johnston | 2019-01-28 | 1 | -20/+53 |
| | | | | | | | | | | | | | | | | | | The validator was being run on the EventBuilder objects, and so the validator only checked a subset of fields. With the upcoming EventBuilder refactor even fewer fields will be there to validate. To get around this we split the validation into those that can be run against an EventBuilder and those run against a fully fledged event. | ||||
* | | Refactor event signing to work on dicts | Erik Johnston | 2019-01-28 | 1 | -12/+35 |
|/ | | | | | | This is in preparation for making EventBuilder format agnostic, which means event signing should be done against the event dict rather than the EventBuilder object. | ||||
* | Require event format version to parse or create events | Erik Johnston | 2019-01-25 | 2 | -2/+73 |
| | |||||
* | 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. | ||||
* | Handle delta_ids being None in _update_context_for_auth_events | Richard van der Hoff | 2018-07-23 | 1 | -1/+2 |
| | | | | | | | it's easier to create the new state group as a delta from the existing one. (There's an outside chance this will help with https://github.com/matrix-org/synapse/issues/3364) | ||||
* | Comments | Erik Johnston | 2018-07-23 | 1 | -2/+3 |
| | |||||
* | Only get cached state from context in persist_event | Erik Johnston | 2018-07-23 | 1 | -0/+13 |
| | | | | | | We don't want to bother pulling out the current state from the DB since until we know we have to. Checking the context for state is just an optimisation. | ||||
* | Fix missing attributes on workers. | Erik Johnston | 2018-07-23 | 1 | -4/+6 |
| | | | | | This was missed during the transition from attribute to getter for getting state from context. | ||||
* | Fix EventContext when using workers | Erik Johnston | 2018-07-23 | 1 | -7/+7 |
| | | | | | | We were: 1. Not correctly setting all attributes 2. Using defer.inlineCallbacks in a non-generator | ||||
* | Update docstrings to make sense | Erik Johnston | 2018-07-23 | 1 | -5/+8 |
| | |||||
* | Add support for updating state | Erik Johnston | 2018-07-23 | 1 | -0/+19 |
| | |||||
* | Make EventContext lazy load state | Erik Johnston | 2018-07-23 | 1 | -41/+112 |
| | |||||
* | pep8 | Erik Johnston | 2018-07-23 | 1 | -1/+1 |
| | |||||
* | Refcator EventContext to accept state during init | Erik Johnston | 2018-07-23 | 1 | -21/+27 |
| | |||||
* | Make the rest of the .iterwhatever go away (#3562) | Amber Brown | 2018-07-21 | 1 | -1/+3 |
| | |||||
* | run isort | Amber Brown | 2018-07-09 | 5 | -15/+14 |
| | |||||
* | 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) | ||||
* | Replace some more comparisons with six | Adrian Tschira | 2018-05-19 | 2 | -3/+7 |
| | | | | | | plus a bonus b"" string I missed last time Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | 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> | ||||
* | Remove context.push_actions | Erik Johnston | 2018-02-15 | 1 | -4/+0 |
| | |||||
* | Don't serialize current state over replication | Erik Johnston | 2018-02-15 | 1 | -6/+35 |
| | |||||
* | Add replication http endpoint for event sending | Erik Johnston | 2018-02-07 | 1 | -0/+72 |
| | |||||
* | Store state groups separately from events (#2784) | Erik Johnston | 2018-02-06 | 1 | -1/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split state group persist into seperate storage func * Add per database engine code for state group id gen * Move store_state_group to StateReadStore This allows other workers to use it, and so resolve state. * Hook up store_state_group * Fix tests * Rename _store_mult_state_groups_txn * Rename StateGroupReadStore * Remove redundant _have_persisted_state_group_txn * Update comments * Comment compute_event_context * Set start val for state_group_id_seq ... otherwise we try to recreate old state groups * Update comments * Don't store state for outliers * Update comment * Update docstring as state groups are ints | ||||
* | replace 'except:' with 'except Exception:' | Richard van der Hoff | 2017-10-23 | 1 | -1/+1 |
| | | | | what could possibly go wrong | ||||
* | Remove pointless create() method | Richard van der Hoff | 2017-10-20 | 1 | -1/+1 |
| | | | | | It just calls the constructor, so we may as well kill it rather than having random codepaths. | ||||
* | Spam checking: add the invitee to user_may_invite | David Baker | 2017-10-05 | 1 | -2/+2 |
| | |||||
* | spam check room publishing | David Baker | 2017-10-04 | 1 | -0/+18 |
| | |||||
* | Add room creation checks to spam checker | David Baker | 2017-10-04 | 1 | -0/+32 |
| | | | | | Lets the spam checker deny attempts to create rooms and add aliases to them. | ||||
* | s/roomid/room_id/ | David Baker | 2017-10-03 | 1 | -2/+2 |
| | |||||
* | pass room id too | David Baker | 2017-10-03 | 1 | -2/+2 |
| | |||||
* | Actually write warpper function | David Baker | 2017-10-03 | 1 | -0/+16 |
| | |||||
* | Don't test is spam_checker not None | David Baker | 2017-09-27 | 1 | -1/+7 |
| | | | | | Sometimes it's a Mock object which is not none but is still not what we're after | ||||
* | Remove unintentional debugging | David Baker | 2017-09-27 | 1 | -1/+0 |
| | |||||
* | pep8 | David Baker | 2017-09-27 | 1 | -0/+1 |
| | |||||
* | Make the spam checker a module | David Baker | 2017-09-26 | 1 | -17/+20 |
| | |||||
* | fix thinko'd docstring | Matthew Hodgson | 2017-09-22 | 1 | -1/+1 |
| | |||||
* | PoC for filtering spammy events (#2456) | Richard van der Hoff | 2017-09-19 | 1 | -0/+38 |
| | | | Demonstration of how you might add some hooks to filter out spammy events. | ||||
* | Add more granular event send metrics | Erik Johnston | 2017-05-02 | 1 | -0/+3 |
| | |||||
* | Comment and remove spurious logging | Erik Johnston | 2017-04-27 | 1 | -0/+3 |
| | |||||
* | Fix tests | Erik Johnston | 2017-04-26 | 1 | -3/+3 |
| | |||||
* | Fix invite state to always include all events | Erik Johnston | 2017-04-26 | 1 | -1/+19 |
| | |||||
* | Refactoring and cleanups | Richard van der Hoff | 2017-03-17 | 1 | -0/+26 |
| | | | | | | | | | | | | A few non-functional changes: * A bunch of docstrings to document types * Split `EventsStore._persist_events_txn` up a bit. Hopefully it's a bit more readable. * Rephrase `EventFederationStore._update_min_depth_for_room_txn` to avoid mind-bending conditional. * Rephrase rejected/outlier conditional in `_update_outliers_txn` to avoid mind-bending conditional. | ||||
* | Optimise state resolution | Erik Johnston | 2017-01-17 | 2 | -4/+10 |
| | |||||
* | 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. | ||||
* | Review comments | Kegan Dougal | 2016-11-22 | 1 | -11/+9 |
| | |||||
* | Also check for dict since sometimes they aren't frozen | Kegan Dougal | 2016-11-22 | 1 | -1/+1 |
| | |||||
* | Glue only_event_fields into the sync rest servlet | Kegan Dougal | 2016-11-22 | 1 | -1/+1 |
| | |||||
* | More tests | Kegan Dougal | 2016-11-22 | 1 | -3/+4 |
| | |||||
* | Start adding some tests | Kegan Dougal | 2016-11-21 | 1 | -1/+3 |
| | |||||
* | Move event_fields filtering to serialize_event | Kegan Dougal | 2016-11-21 | 1 | -4/+97 |
| | | | | Also make it an inclusive not exclusive filter, as the spec demands. | ||||
* | Add comments | Erik Johnston | 2016-09-05 | 1 | -0/+5 |
| | |||||
* | Move to storing state_groups_state as deltas | Erik Johnston | 2016-09-01 | 1 | -0/+16 |
| | |||||
* | Correctly handle the difference between prev and current state | Erik Johnston | 2016-08-31 | 1 | -2/+3 |
| | |||||
* | Make None optional | Erik Johnston | 2016-08-26 | 1 | -1/+1 |
| | |||||
* | Replace context.current_state with context.current_state_ids | Erik Johnston | 2016-08-25 | 1 | -11/+2 |
| | |||||
* | Pull out event ids rather than full events for state | Erik Johnston | 2016-08-25 | 1 | -0/+8 |
| | |||||
* | Include prev_content in redacted state events | Erik Johnston | 2016-08-11 | 1 | -0/+2 |
| | |||||
* | 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 |
| | |||||
* | Atomically persit push actions when we persist the event | Erik Johnston | 2016-02-09 | 1 | -0/+1 |
| | |||||
* | Make Event objects behave more like dicts | Erik Johnston | 2016-01-18 | 1 | -0/+9 |
| | |||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 5 | -5/+5 |
| | |||||
* | Only add the user_id if the sender is present | Mark Haines | 2015-12-01 | 1 | -1/+3 |
| | |||||
* | Copy rather than move the fields to shuffle between a v1 and a v2 event. | Mark Haines | 2015-11-30 | 1 | -9/+5 |
| | | | | | | | | | | This should make all v1 APIs compatible with v2 clients. While still allowing v1 clients to access the fields. This makes the documentation easier since we can just document the v2 format and explain that some of the fields, in some of the APIs are duplicated for backwards compatibility, rather than having to document two separate event formats. | ||||
* | Flatten the /sync response to remove the event_map | Richard van der Hoff | 2015-11-19 | 1 | -2/+1 |
| | |||||
* | Update the other place check_joined_room is called | Mark Haines | 2015-10-30 | 1 | -1/+2 |
| | |||||
* | Surely we don't need to preserve 'events_default' twice | Paul "LeoNerd" Evans | 2015-10-16 | 1 | -1/+0 |
| | |||||
* | Bundle in some room state in the unsigned bit of the invite when sending to ↵ | Erik Johnston | 2015-09-10 | 1 | -1/+4 |
| | | | | invited servers | ||||
* | Fix bug where we didn't correctly serialize the redacted_because key over ↵ | Erik Johnston | 2015-08-21 | 1 | -1/+4 |
| | | | | federation | ||||
* | Rename key and values for m.room.history_visibility. Support 'invited' value | Erik Johnston | 2015-07-06 | 1 | -1/+1 |
| | |||||
* | Add m.room.history_visibility to list of auth events | Erik Johnston | 2015-07-03 | 1 | -0/+2 |
| | |||||
* | 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 |
| | |||||
* | Remove concept of context.auth_events, instead use context.current_state | Erik Johnston | 2015-03-16 | 1 | -2/+1 |
| | |||||
* | 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. | ||||
* | Actually, the old prune_event function was non-deterministic, so no point ↵ | Erik Johnston | 2015-02-03 | 1 | -79/+0 |
| | | | | keeping it around :( | ||||
* | Keep around the old (buggy) version of the prune_event function so that we ↵ | Erik Johnston | 2015-02-03 | 1 | -0/+79 |
| | | | | can use it to check signatures for events on old servers | ||||
* | Merge pull request #43 from matrix-org/rejections | Erik Johnston | 2015-01-30 | 3 | -6/+12 |
|\ | | | | | Rejections | ||||
| * | Merge branch 'develop' of github.com:matrix-org/synapse into rejections | Erik Johnston | 2015-01-30 | 1 | -6/+6 |
| |\ | | | | | | | | | | | | | | | | Conflicts: synapse/storage/__init__.py synapse/storage/schema/delta/v12.sql | ||||
| * | | Fix bug where we changes in outlier in metadata dict propogated to other events | Erik Johnston | 2015-01-30 | 3 | -4/+8 |
| | | | |||||
| * | | Initial implementation of auth conflict resolution | Erik Johnston | 2015-01-29 | 1 | -2/+4 |
| | | | |||||
* | | | Merge pull request #41 from matrix-org/client_v2_sync | Mark Haines | 2015-01-30 | 1 | -33/+52 |
|\ \ \ | | | | | | | | | Client v2 sync | ||||
| * | | | Include transaction ids in unsigned section of events in the sync results ↵ | Mark Haines | 2015-01-29 | 1 | -5/+6 |
| | | | | | | | | | | | | | | | | for the clients that made those requests | ||||
| * | | | Add support for formatting events in the way a v2 client expects | Mark Haines | 2015-01-29 | 1 | -39/+52 |
| | | | | |||||
| * | | | Start implementing incremental initial sync | Mark Haines | 2015-01-27 | 1 | -0/+1 |
| | | | | |||||
| * | | | Start implementing the non-incremental sync portion of the v2 /sync API | Mark Haines | 2015-01-26 | 1 | -1/+5 |
| | |/ | |/| | |||||
* | | | Merge branch 'develop' of github.com:matrix-org/synapse into rejections_storage | Erik Johnston | 2015-01-30 | 1 | -6/+6 |
|\| | | |/ |/| | | | | | | | Conflicts: synapse/storage/__init__.py synapse/storage/schema/delta/v12.sql | ||||
| * | Pass the current time to serialize event, rather than passing an | Mark Haines | 2015-01-26 | 1 | -6/+6 |
| | | | | | | | | | | | | HS and getting a clock from it and calling time_msec on the clock. Remove the serialize_event method from the HS since it is no longer needed. | ||||
* | | Add support for storing rejected events in EventContext and data stores | Erik Johnston | 2015-01-22 | 1 | -0/+1 |
|/ | |||||
* | Remove unused functions | Mark Haines | 2015-01-13 | 1 | -6/+0 |
| | |||||
* | Merge branch 'hotfixes-v0.6.1b' of github.com:matrix-org/synapse into develop | Erik Johnston | 2015-01-13 | 1 | -1/+1 |
|\ | |||||
| * | Insert 'age' into top level when returning events to clients | Erik Johnston | 2015-01-13 | 1 | -1/+1 |
| | | |||||
* | | Return the raw federation event rather than adding extra keys for federation ↵ | Kegan Dougal | 2015-01-08 | 1 | -9/+16 |
| | | | | | | | | data. | ||||
* | | Add 'raw' query parameter to expose the event graph and signatures to savvy ↵ | Kegan Dougal | 2015-01-08 | 1 | -8/+9 |
|/ | | | | clients. | ||||
* | 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 | 5 | -5/+5 |
| | |||||
* | Remove unneeded federation keys from events | Mark Haines | 2014-12-19 | 1 | -0/+3 |
| | |||||
* | 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 |
| | |||||
* | Remove unused functions | Erik Johnston | 2014-12-15 | 1 | -42/+0 |
| | |||||
* | Finish up upgrade script | Erik Johnston | 2014-12-15 | 1 | -1/+1 |
| | |||||
* | Fix bug where we ignored event_edge_hashes table | Erik Johnston | 2014-12-15 | 1 | -0/+1 |
| | |||||
* | Validate message, topic and name event contents | Erik Johnston | 2014-12-12 | 1 | -0/+21 |
| | |||||
* | Fix prev_content | Erik Johnston | 2014-12-11 | 1 | -0/+8 |
| | |||||
* | Fix redactions. Fix 'age' key | Erik Johnston | 2014-12-11 | 3 | -3/+32 |
| | |||||
* | Add some basic event validation | Erik Johnston | 2014-12-10 | 1 | -8/+21 |
| | |||||
* | 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 | 2 | -11/+14 |
| | |||||
* | Add PEP8 newlines | Erik Johnston | 2014-12-09 | 3 | -3/+3 |
| | |||||
* | More bug fixes | Erik Johnston | 2014-12-08 | 1 | -8/+1 |
| | |||||
* | Various typos and bug fixes. | Erik Johnston | 2014-12-08 | 2 | -1/+4 |
| | |||||
* | Start making more things use EventContext rather than event.* | Erik Johnston | 2014-12-05 | 2 | -2/+49 |
| | |||||
* | Convert rest and handlers to use new event structure | Erik Johnston | 2014-12-04 | 2 | -5/+8 |
| | |||||
* | 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 | 5 | -78/+286 |
| | |||||
* | Begin fleshing out a new Event object | Erik Johnston | 2014-12-02 | 2 | -0/+194 |