Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix another jsonschema typecheck error (#11830) | David Robertson | 2022-01-25 | 1 | -4/+2 |
| | | | | | | | | | | | | | | | | | | | | | Similar to #11817. In `_create_power_level_validator` we - retrieve `validator`. This is a class implementing the `jsonschema.protocols.Validator` interface. In other words, `validator: Type[jsonschema.protocols.Validator]`. - we then create an second validator class by modifying the original `validator`. We return that class, which is also of type `Type[jsonschema.protocols.Validator]`. So the original annotation was incorrect: it claimed we were returning an instance of jsonSchema.Draft7Validator, not the class (or a subclass) itself. (Strictly speaking this is incorrect, because `POWER_LEVELS_SCHEMA` isn't pinned to a particular version of JSON Schema. But there are other complications with the type stubs if you try to fix this; I felt like the change herein was a decent compromise that better expresses intent). (I suspect/hope the typeshed project would welcome an effort to improve the jsonschema stubs. Let's see if I get some spare time.) | ||||
* | Ignore the jsonschema type. (#11817) | Patrick Cloke | 2022-01-25 | 1 | -1/+3 |
| | |||||
* | Add remaining type hints to `synapse.events`. (#11098) | Patrick Cloke | 2021-11-02 | 1 | -1/+1 |
| | |||||
* | Add type hints to synapse.events.*. (#11066) | Patrick Cloke | 2021-10-13 | 1 | -8/+10 |
| | | | Except `synapse/events/__init__.py`, which will be done in a follow-up. | ||||
* | Use direct references for some configuration variables (#10798) | Patrick Cloke | 2021-09-13 | 1 | -1/+1 |
| | | | | Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit). | ||||
* | Validate new m.room.power_levels events (#10232) | Aaron Raimist | 2021-08-26 | 1 | -2/+75 |
| | | | | Signed-off-by: Aaron Raimist <aaron@raim.ist> | ||||
* | 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>` | ||||
* | Block clients from sending server ACLs that lock the local server out. (#8708) | Erik Johnston | 2020-11-03 | 1 | -9/+18 |
| | | | Fixes #4042 | ||||
* | 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 | ||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 1 | -1/+1 |
| | |||||
* | Allow capping a room's retention policy (#8104) | Brendan Abolivier | 2020-08-24 | 1 | -56/+3 |
| | |||||
* | Replace all remaining six usage with native Python 3 equivalents (#7704) | Dagfinn Ilmari Mannsåker | 2020-06-16 | 1 | -7/+5 |
| | |||||
* | Strictly enforce canonicaljson requirements in a new room version (#7381) | Patrick Cloke | 2020-05-14 | 1 | -0/+7 |
| | |||||
* | Implement per-room message retention policies | Brendan Abolivier | 2019-11-04 | 1 | -3/+97 |
| | |||||
* | 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 |
| | |||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -14/+7 |
| | |||||
* | Do checks on aliases for incoming m.room.aliases events (#5128) | Brendan Abolivier | 2019-05-08 | 1 | -2/+13 |
| | | | | | 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. | ||||
* | Collect room-version variations into one place (#4969) | Richard van der Hoff | 2019-04-01 | 1 | -1/+2 |
| | | | | 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. | ||||
* | Don't assert an event must have an event ID | Erik Johnston | 2019-01-29 | 1 | -2/+3 |
| | |||||
* | 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. | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -4/+4 |
| | |||||
* | Replace some more comparisons with six | Adrian Tschira | 2018-05-19 | 1 | -2/+4 |
| | | | | | | plus a bonus b"" string I missed last time Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Update copyright notices | Mark Haines | 2015-01-06 | 1 | -1/+1 |
| | |||||
* | Validate message, topic and name event contents | Erik Johnston | 2014-12-12 | 1 | -0/+21 |
| | |||||
* | Add some basic event validation | Erik Johnston | 2014-12-10 | 1 | -8/+21 |
| | |||||
* | Add PEP8 newlines | Erik Johnston | 2014-12-09 | 1 | -1/+1 |
| | |||||
* | WIP for new way of managing events. | Erik Johnston | 2014-12-03 | 1 | -0/+58 |