Eric Eastwood
96f6293de5
Add endpoints for backfilling history (MSC2716) ( #9247 )
...
Work on https://github.com/matrix-org/matrix-doc/pull/2716
2021-06-22 10:02:53 +01:00
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>`
2021-04-14 15:34:27 +01:00
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
2021-02-16 22:32:34 +00:00
Richard van der Hoff
da0090fdff
Fix modifying events in ThirdPartyRules
modules ( #8564 )
...
EventBuilder.build wants auth events these days
2020-10-16 13:39:46 +01:00
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.
2020-10-13 23:58:48 +01:00
Patrick Cloke
c619253db8
Stop sub-classing object ( #8249 )
2020-09-04 06:54:56 -04:00
Patrick Cloke
da77520cd1
Convert additional databases to async/await part 2 ( #8200 )
2020-09-01 08:39:04 -04:00
Erik Johnston
5dd73d029e
Add type hints to handlers.message and events.builder ( #8067 )
2020-08-12 15:05:50 +01:00
Patrick Cloke
d4a7829b12
Convert synapse.api to async/await ( #8031 )
2020-08-06 08:30:06 -04:00
Patrick Cloke
8553f46498
Convert a synapse.events to async/await. ( #7949 )
2020-07-27 13:40:22 -04:00
Patrick Cloke
b975fa2e99
Convert state resolution to async/await ( #7942 )
2020-07-24 10:59:51 -04:00
Richard van der Hoff
67593b1728
Add HomeServer.signing_key
property ( #7805 )
...
... instead of duplicating `config.signing_key[0]` everywhere
2020-07-08 17:51:56 +01:00
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.
2020-02-07 15:30:04 +00:00
Richard van der Hoff
2a81393a4b
Pass room_version into add_hashes_and_signatures
2020-01-30 22:15:50 +00:00
Richard van der Hoff
54f3f369bd
Pass room_version into create_local_event_from_event_dict
2020-01-30 22:15:50 +00:00
Richard van der Hoff
ef6bdafb29
Store the room version in EventBuilder
2020-01-30 22:15:50 +00:00
Amber Brown
4806651744
Replace returnValue with return ( #5736 )
2019-07-23 23:00:55 +10:00
Amber Brown
32e7c9e7f2
Run Black. ( #5482 )
2019-06-20 19:32:02 +10:00
Tulir Asokan
dd64b9dbdd
Fix appservice timestamp massaging ( #5233 )
...
Signed-off-by: Tulir Asokan <tulir@maunium.net>
2019-05-24 14:44:04 +01:00
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.
2019-05-21 13:47:25 +01:00
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.
2019-04-01 10:24:38 +01:00
Erik Johnston
84af577356
Implement event format v2
2019-01-29 18:06:11 +00:00
Erik Johnston
fb99dae9c8
Don't set event_id twice
2019-01-29 12:08:23 +00:00
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
2019-01-29 11:13:00 +00:00
Erik Johnston
a50cf929c1
Require event format version to parse or create events
2019-01-25 10:32:19 +00:00
Erik Johnston
be6a7e47fa
Revert "Require event format version to parse or create events"
2019-01-25 10:23:51 +00:00
Erik Johnston
f431ff3fb8
Require event format version to parse or create events
2019-01-23 20:21:33 +00:00
Amber Brown
49af402019
run isort
2018-07-09 16:09:20 +10:00
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.
2017-10-20 22:14:55 +01:00
Erik Johnston
5d6bad1b3c
Optimise state resolution
2017-01-17 13:22:19 +00:00
Matthew Hodgson
6c28ac260c
copyrights
2016-01-07 04:26:29 +00:00
Erik Johnston
c1c7b39827
Fix bug where we changes in outlier in metadata dict propogated to other events
2015-01-30 10:30:54 +00:00
Mark Haines
3891597eb3
Remove unused functions
2015-01-13 15:57:26 +00:00
Mark Haines
adb04b1e57
Update copyright notices
2015-01-06 13:21:39 +00:00
Erik Johnston
8cdebce470
Fix redactions. Fix 'age' key
2014-12-11 13:25:19 +00:00
Erik Johnston
95aa903ffa
Try and figure out how and why signatures are being changed.
2014-12-10 11:37:47 +00:00
Erik Johnston
8c48450682
Add PEP8 newlines
2014-12-09 10:58:31 +00:00
Erik Johnston
c31dba86ec
Convert rest and handlers to use new event structure
2014-12-04 15:50:01 +00:00
Erik Johnston
75b4329aaa
WIP for new way of managing events.
2014-12-03 16:07:21 +00:00
Erik Johnston
c1e66800a9
Begin fleshing out a new Event object
2014-12-02 11:40:22 +00:00