mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Move join response params into a struct
This commit is contained in:
parent
6e8666870d
commit
1e174e04eb
|
|
@ -170,7 +170,7 @@ func (r *FederationInternalAPI) performJoinUsingServer(
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
event, respState, err := fclient.PerformJoin(ctx, r.federation, joinInput, callbacks)
|
response, err := fclient.PerformJoin(ctx, r.federation, joinInput, callbacks)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -181,7 +181,7 @@ func (r *FederationInternalAPI) performJoinUsingServer(
|
||||||
// joining a room, waiting for 200 OK then changing device keys and have those keys not be sent
|
// joining a room, waiting for 200 OK then changing device keys and have those keys not be sent
|
||||||
// to other servers (this was a cause of a flakey sytest "Local device key changes get to remote servers")
|
// to other servers (this was a cause of a flakey sytest "Local device key changes get to remote servers")
|
||||||
// The events are trusted now as we performed auth checks above.
|
// The events are trusted now as we performed auth checks above.
|
||||||
joinedHosts, err := consumers.JoinedHostsFromEvents(respState.GetStateEvents().TrustedEvents(event.RoomVersion, false))
|
joinedHosts, err := consumers.JoinedHostsFromEvents(response.StateSnapshot.GetStateEvents().TrustedEvents(response.JoinEvent.RoomVersion, false))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("JoinedHostsFromEvents: failed to get joined hosts: %s", err)
|
return fmt.Errorf("JoinedHostsFromEvents: failed to get joined hosts: %s", err)
|
||||||
}
|
}
|
||||||
|
|
@ -197,8 +197,8 @@ func (r *FederationInternalAPI) performJoinUsingServer(
|
||||||
r.rsAPI,
|
r.rsAPI,
|
||||||
user.Domain(),
|
user.Domain(),
|
||||||
roomserverAPI.KindNew,
|
roomserverAPI.KindNew,
|
||||||
respState,
|
response.StateSnapshot,
|
||||||
event,
|
response.JoinEvent,
|
||||||
serverName,
|
serverName,
|
||||||
nil,
|
nil,
|
||||||
false,
|
false,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue