Patrick Cloke
7581d30e9f
Remove unused federation endpoint (`query_auth`) ( #7026 )
2020-03-17 08:04:49 -04:00
Patrick Cloke
12d4259000
Add some type annotations to the federation base & client classes ( #6995 )
2020-02-28 07:31:07 -05:00
Richard van der Hoff
928edef979
Pass room_version into `event_from_pdu_json`
...
It's called from all over the shop, so this one's a bit messy.
2020-02-06 16:08:27 +00:00
Richard van der Hoff
b0c8bdd49d
pass room version into FederationClient.send_join ( #6854 )
...
... which allows us to sanity-check the create event.
2020-02-06 15:50:39 +00:00
Richard van der Hoff
ee0525b2b2
Simplify `room_version` handling in `FederationClient.send_invite`
2020-02-05 17:43:57 +00:00
Richard van der Hoff
f84700fba8
Pass room version object into `FederationClient.get_pdu`
2020-02-05 17:25:46 +00:00
Richard van der Hoff
6bbd890f05
make FederationClient._do_send_invite async
2020-02-05 15:50:31 +00:00
Richard van der Hoff
146fec0820
Apply suggestions from code review
...
Co-Authored-By: Erik Johnston <erik@matrix.org>
2020-02-05 15:47:00 +00:00
Richard van der Hoff
ea23210b2d
make FederationClient.send_invite async
2020-02-03 22:29:49 +00:00
Richard van der Hoff
6deeefb68c
make FederationClient.get_missing_events async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
abadf44eb2
make FederationClient._do_send_leave async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
e88b90aaeb
make FederationClient.send_leave.send_request async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
638001116d
make FederationClient._do_send_join async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
3960527c2e
make FederationClient.send_join.send_request async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
ad09ee9262
make FederationClient.make_membership_event.send_request async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
1330c311b7
make FederationClient._try_destination_list async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
a46fabf17b
make FederationClient.send_leave async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
8af9f11bea
make FederationClient.send_join async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
3f11cbb404
make FederationClient.make_membership_event async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
24d814ca23
make FederationClient.get_event_auth async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
d73683c363
make FederationClient.get_room_state_ids async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
0cb0c7bcd5
make FederationClient.get_pdu async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
0536d0c9be
make FederationClient.backfill async
2020-02-03 22:28:45 +00:00
Richard van der Hoff
a5afdd15e5
Merge pull request #6806 from matrix-org/rav/redact_changes/3
...
Pass room_version into add_hashes_and_signatures
2020-01-31 10:57:03 +00:00
Richard van der Hoff
d7bf793cc1
s/get_room_version/get_room_version_id/
...
... to make way for a forthcoming get_room_version which returns a RoomVersion
object.
2020-01-31 10:06:21 +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
Erik Johnston
8df862e45d
Add `rooms.room_version` column ( #6729 )
...
This is so that we don't have to rely on pulling it out from `current_state_events` table.
2020-01-27 14:30:57 +00:00
Brendan Abolivier
54ae52ba96
Merge pull request #6349 from matrix-org/babolivier/msc1802
...
Implement v2 APIs for send_join and send_leave
2019-12-11 11:41:47 +00:00
Richard van der Hoff
f8bc2ae883
Move get_state methods into FederationHandler ( #6503 )
...
This is a non-functional refactor as a precursor to some other work.
2019-12-10 17:42:46 +00:00
Richard van der Hoff
c3dda2874d
Refactor get_events_from_store_or_dest to return a dict ( #6501 )
...
There was a bunch of unnecessary conversion back and forth between dict and
list going on here. We can simplify a bunch of the code.
2019-12-10 16:22:00 +00:00
Richard van der Hoff
e519489fc4
Remove fallback for missing /federation/v1/state_ids API ( #6488 )
...
This API was added way back in 0.17.0; the code here is annoying to maintain
and entirely redundant.
2019-12-09 11:37:26 +00:00
Brendan Abolivier
e126d83f74
Merge branch 'develop' into babolivier/msc1802
2019-12-05 21:00:43 +00:00
Andrew Morgan
bc29a19731
Replace instance variations of homeserver with correct case/spacing
2019-11-12 13:08:12 +00:00
Brendan Abolivier
94cdd6fffe
Lint
2019-11-11 16:56:55 +00:00
Brendan Abolivier
1e202a90f1
Implement v2 API for send_leave
2019-11-11 16:26:53 +00:00
Brendan Abolivier
92527d7b21
Add missing yield
2019-11-11 16:20:53 +00:00
Brendan Abolivier
4c131b2c78
Implement v2 API for send_join
2019-11-11 15:47:47 +00:00
Andrew Morgan
ace947e8da
Depublish a room from the public rooms list when it is upgraded ( #6232 )
2019-11-01 10:28:09 +00:00
Andrew Morgan
54fef094b3
Remove usage of deprecated logger.warn method from codebase ( #6271 )
...
Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
2019-10-31 10:23:24 +00:00
Michael Kaye
9eebc1e73b
use %r to __repr__ objects
...
This avoids calculating __repr__ unless we are going to log.
2019-10-24 18:18:56 +01:00
Richard van der Hoff
1ba359a11f
rip out some unreachable code
...
The only possible rejection reason is AUTH_ERROR, so all of this is unreachable.
2019-10-17 21:45:59 +01:00
Andrew Morgan
4548d1f87e
Remove unnecessary parentheses around return statements ( #5931 )
...
Python will return a tuple whether there are parentheses around the returned values or not.
I'm just sick of my editor complaining about this all over the place :)
2019-08-30 16:28:26 +01:00
Erik Johnston
a8f40a8302
Return 502 not 500 when failing to reach any remote server.
2019-08-01 13:47:31 +01:00
Amber Brown
865077f1d1
Room Complexity Client Implementation ( #5783 )
2019-07-30 02:47:27 +10:00
Amber Brown
4806651744
Replace returnValue with return ( #5736 )
2019-07-23 23:00:55 +10:00
Amber Brown
463b072b12
Move logging utilities out of the side drawer of util/ and into logging/ ( #5606 )
2019-07-04 00:07:04 +10:00
Amber Brown
32e7c9e7f2
Run Black. ( #5482 )
2019-06-20 19:32:02 +10:00
Richard van der Hoff
2615c6bd9e
Clean up debug logging ( #5347 )
...
Remove some spurious stuff, clarify some other stuff
2019-06-05 10:35:40 +01:00
Richard van der Hoff
dae224a73f
Fix failure to fetch batches of PDUs ( #5342 )
...
FederationClient.get_pdu is called in a loop to fetch a batch of PDUs. A
failure to fetch one should not result in a failure of the whole batch. Add the
missing `continue`.
2019-06-04 18:05:06 +01:00
Richard van der Hoff
b4189b112f
Rename get_events->get_events_from_store_or_dest ( #5344 )
...
We have too many things called get_event, and it's hard to figure out what we
mean. Also remove some unused params from the signature, and add some logging.
2019-06-04 18:01:09 +01:00