diff options
Diffstat (limited to 'federationapi/routing/threepid.go')
-rw-r--r-- | federationapi/routing/threepid.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/federationapi/routing/threepid.go b/federationapi/routing/threepid.go index 4db5273a..ed6af526 100644 --- a/federationapi/routing/threepid.go +++ b/federationapi/routing/threepid.go @@ -65,7 +65,7 @@ func CreateInvitesFrom3PIDInvites( return *reqErr } - evs := []gomatrixserverlib.HeaderedEvent{} + evs := []*gomatrixserverlib.HeaderedEvent{} for _, inv := range body.Invites { verReq := api.QueryRoomVersionForRoomRequest{RoomID: inv.RoomID} verRes := api.QueryRoomVersionForRoomResponse{} @@ -84,7 +84,7 @@ func CreateInvitesFrom3PIDInvites( return jsonerror.InternalServerError() } if event != nil { - evs = append(evs, (*event).Headered(verRes.RoomVersion)) + evs = append(evs, event.Headered(verRes.RoomVersion)) } } @@ -165,7 +165,7 @@ func ExchangeThirdPartyInvite( // Ask the requesting server to sign the newly created event so we know it // acknowledged it - signedEvent, err := federation.SendInvite(httpReq.Context(), request.Origin(), *event) + signedEvent, err := federation.SendInvite(httpReq.Context(), request.Origin(), event) if err != nil { util.GetLogger(httpReq.Context()).WithError(err).Error("federation.SendInvite failed") return jsonerror.InternalServerError() @@ -175,7 +175,7 @@ func ExchangeThirdPartyInvite( if err = api.SendEvents( httpReq.Context(), rsAPI, api.KindNew, - []gomatrixserverlib.HeaderedEvent{ + []*gomatrixserverlib.HeaderedEvent{ signedEvent.Event.Headered(verRes.RoomVersion), }, cfg.Matrix.ServerName, @@ -297,7 +297,7 @@ func buildMembershipEvent( authEvents := gomatrixserverlib.NewAuthEvents(nil) for i := range queryRes.StateEvents { - err = authEvents.AddEvent(&queryRes.StateEvents[i].Event) + err = authEvents.AddEvent(queryRes.StateEvents[i].Event) if err != nil { return nil, err } @@ -318,7 +318,7 @@ func buildMembershipEvent( cfg.Matrix.PrivateKey, queryRes.RoomVersion, ) - return &event, err + return event, err } // sendToRemoteServer uses federation to send an invite provided by an identity |