Update GMSL: use static Check functions (#3052)

Sister PR to https://github.com/matrix-org/gomatrixserverlib/pull/359 

A nice side effect is that we don't need to re-parse the events in some
cases.
This commit is contained in:
kegsay 2023-04-14 12:32:42 +01:00 committed by GitHub
parent 94e81cc3f3
commit ca63b414da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 31 deletions

View file

@ -654,11 +654,11 @@ func (rc *reqCtx) injectResponseToRoomserver(res *MSC2836EventRelationshipsRespo
messageEvents = append(messageEvents, ev)
}
}
respState := fclient.RespState{
respState := &fclient.RespState{
AuthEvents: res.AuthChain,
StateEvents: stateEvents,
}
eventsInOrder := respState.Events(rc.roomVersion)
eventsInOrder := gomatrixserverlib.LineariseStateResponse(rc.roomVersion, respState)
// everything gets sent as an outlier because auth chain events may be disjoint from the DAG
// as may the threaded events.
var ires []roomserver.InputRoomEvent