Try to recursively find auth events (to a point) if they are missing (#881)

* Try to recursively find auth events (to a point) if they are missing

* Remove recursion limit for now and other review fixes

* Simplify error handling for recursion

* Pass room version 1 only to MakeJoin until room version support comes later
This commit is contained in:
Neil Alexander 2020-03-06 16:58:10 +00:00 committed by GitHub
parent 87283e9de7
commit 6a1111c3d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 15 deletions

View file

@ -299,7 +299,7 @@ func (r joinRoomReq) joinRoomUsingServers(
// server was invalid this returns an error.
// Otherwise this returns a JSONResponse.
func (r joinRoomReq) joinRoomUsingServer(roomID string, server gomatrixserverlib.ServerName) (*util.JSONResponse, error) {
respMakeJoin, err := r.federation.MakeJoin(r.req.Context(), server, roomID, r.userID)
respMakeJoin, err := r.federation.MakeJoin(r.req.Context(), server, roomID, r.userID, []int{1})
if err != nil {
// TODO: Check if the user was not allowed to join the room.
return nil, err