fix build & lint

This commit is contained in:
Matthew Hodgson 2020-09-11 22:31:56 +01:00
parent 65e59a1af9
commit a5c0521c3f
2 changed files with 3 additions and 2 deletions

View file

@ -221,7 +221,7 @@ func Setup(
queryVars := httpReq.URL.Query() queryVars := httpReq.URL.Query()
remoteVersions := []gomatrixserverlib.RoomVersion{} remoteVersions := []gomatrixserverlib.RoomVersion{}
if vers, ok := queryVars["ver"]; ok { if vers, ok := queryVars["ver"]; ok {
// The remote side supplied a ?=ver so use that to build up the list // The remote side supplied a ?ver= so use that to build up the list
// of supported room versions // of supported room versions
for _, v := range vers { for _, v := range vers {
remoteVersions = append(remoteVersions, gomatrixserverlib.RoomVersion(v)) remoteVersions = append(remoteVersions, gomatrixserverlib.RoomVersion(v))

View file

@ -458,7 +458,8 @@ func (t *txnReq) processEventWithMissingState(ctx context.Context, e gomatrixser
// pass the event along with the state to the roomserver using a background context so we don't // pass the event along with the state to the roomserver using a background context so we don't
// needlessly expire // needlessly expire
return api.SendEventWithState(context.Background(), t.rsAPI, resolvedState, e.Headered(roomVersion), t.haveEventIDs()) headeredEvent := e.Headered(roomVersion)
return api.SendEventWithState(context.Background(), t.rsAPI, resolvedState, &headeredEvent, t.haveEventIDs())
} }
// lookupStateAfterEvent returns the room state after `eventID`, which is the state before eventID with the state of `eventID` (if it's a state event) // lookupStateAfterEvent returns the room state after `eventID`, which is the state before eventID with the state of `eventID` (if it's a state event)