Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ( #9786 )
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>`
il y a 3 ans
Eric Eastwood
0a00b7ff14
Update black, and run auto formatting over the codebase ( #9381 )
- Update black version to the latest
- Run black auto formatting over the codebase
- Run autoformatting according to [`docs/code_style.md
`](80d6dc9783/docs/code_style.md)
- Update `code_style.md` docs around installing black to use the correct version
il y a 3 ans
Richard van der Hoff
da0090fdff
Fix modifying events in `ThirdPartyRules` modules ( #8564 )
EventBuilder.build wants auth events these days
il y a 3 ans
Richard van der Hoff
a34b17e492
Simplify `_locally_reject_invite`
Update `EventCreationHandler.create_event` to accept an auth_events param, and
use it in `_locally_reject_invite` instead of reinventing the wheel.
il y a 3 ans
Patrick Cloke
c619253db8
Stop sub-classing object ( #8249 )
il y a 3 ans
Patrick Cloke
da77520cd1
Convert additional databases to async/await part 2 ( #8200 )
il y a 3 ans
Erik Johnston
5dd73d029e
Add type hints to handlers.message and events.builder ( #8067 )
il y a 3 ans
Patrick Cloke
d4a7829b12
Convert synapse.api to async/await ( #8031 )
il y a 3 ans
Patrick Cloke
8553f46498
Convert a synapse.events to async/await. ( #7949 )
il y a 3 ans
Patrick Cloke
b975fa2e99
Convert state resolution to async/await ( #7942 )
il y a 3 ans
Richard van der Hoff
67593b1728
Add `HomeServer.signing_key` property ( #7805 )
... instead of duplicating `config.signing_key[0]` everywhere
il y a 3 ans
Richard van der Hoff
799001f2c0
Add a `make_event_from_dict` method ( #6858 )
... 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.
il y a 4 ans
Richard van der Hoff
2a81393a4b
Pass room_version into add_hashes_and_signatures
il y a 4 ans
Richard van der Hoff
54f3f369bd
Pass room_version into create_local_event_from_event_dict
il y a 4 ans
Richard van der Hoff
ef6bdafb29
Store the room version in EventBuilder
il y a 4 ans
Amber Brown
4806651744
Replace returnValue with return ( #5736 )
il y a 4 ans
Amber Brown
32e7c9e7f2
Run Black. ( #5482 )
il y a 4 ans
Tulir Asokan
dd64b9dbdd
Fix appservice timestamp massaging ( #5233 )
Signed-off-by: Tulir Asokan <tulir@maunium.net>
il y a 5 ans
Richard van der Hoff
04d53794d6
Fix error handling for rooms whose versions are unknown. ( #5219 )
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.
il y a 5 ans
Richard van der Hoff
54a87a7b08
Collect room-version variations into one place ( #4969 )
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.
il y a 5 ans
Erik Johnston
47e2dd1994
Drop vdh support
il y a 5 ans
Erik Johnston
84af577356
Implement event format v2
il y a 5 ans
Erik Johnston
fb99dae9c8
Don't set event_id twice
il y a 5 ans
Erik Johnston
be47cfa9c9
Refactor event building into EventBuilder
This is so that everything is done in one place, making it easier to
change the event format based on room version
il y a 5 ans
Erik Johnston
a50cf929c1
Require event format version to parse or create events
il y a 5 ans
Erik Johnston
be6a7e47fa
Revert "Require event format version to parse or create events"
il y a 5 ans
Erik Johnston
f431ff3fb8
Require event format version to parse or create events
il y a 5 ans
Amber Brown
49af402019
run isort
il y a 5 ans
Richard van der Hoff
631d7b87b5
Remove pointless create() method
It just calls the constructor, so we may as well kill it rather than having
random codepaths.
il y a 6 ans
Erik Johnston
5d6bad1b3c
Optimise state resolution
il y a 7 ans
Matthew Hodgson
6c28ac260c
copyrights
il y a 8 ans
Erik Johnston
c1c7b39827
Fix bug where we changes in outlier in metadata dict propogated to other events
il y a 9 ans
Mark Haines
3891597eb3
Remove unused functions
il y a 9 ans
Mark Haines
adb04b1e57
Update copyright notices
il y a 9 ans
Erik Johnston
8cdebce470
Fix redactions. Fix 'age' key
il y a 9 ans
Erik Johnston
95aa903ffa
Try and figure out how and why signatures are being changed.
il y a 9 ans
Erik Johnston
8c48450682
Add PEP8 newlines
il y a 9 ans
Erik Johnston
c31dba86ec
Convert rest and handlers to use new event structure
il y a 9 ans
Erik Johnston
75b4329aaa
WIP for new way of managing events.
il y a 9 ans
Erik Johnston
c1e66800a9
Begin fleshing out a new Event object
il y a 9 ans