diff options
Diffstat (limited to 'roomserver/api/wrapper.go')
-rw-r--r-- | roomserver/api/wrapper.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roomserver/api/wrapper.go b/roomserver/api/wrapper.go index 5f74c785..831ffe25 100644 --- a/roomserver/api/wrapper.go +++ b/roomserver/api/wrapper.go @@ -50,10 +50,10 @@ func SendEvents( func SendEventWithState( ctx context.Context, rsAPI InputRoomEventsAPI, virtualHost gomatrixserverlib.ServerName, kind Kind, - state *fclient.RespState, event *gomatrixserverlib.HeaderedEvent, + state gomatrixserverlib.StateResponse, event *gomatrixserverlib.HeaderedEvent, origin gomatrixserverlib.ServerName, haveEventIDs map[string]bool, async bool, ) error { - outliers := state.Events(event.RoomVersion) + outliers := gomatrixserverlib.LineariseStateResponse(event.RoomVersion, state) ires := make([]InputRoomEvent, 0, len(outliers)) for _, outlier := range outliers { if haveEventIDs[outlier.EventID()] { @@ -66,7 +66,7 @@ func SendEventWithState( }) } - stateEvents := state.StateEvents.UntrustedEvents(event.RoomVersion) + stateEvents := state.GetStateEvents().UntrustedEvents(event.RoomVersion) stateEventIDs := make([]string, len(stateEvents)) for i := range stateEvents { stateEventIDs[i] = stateEvents[i].EventID() |