Client API ddoesn't need to send invite room state, the roomserver will work it out

This commit is contained in:
Neil Alexander 2020-04-23 16:37:38 +01:00
parent 48e3088e90
commit a82bce9b7b
2 changed files with 2 additions and 5 deletions

View file

@ -105,13 +105,11 @@ func (c *RoomserverProducer) SendInputRoomEvents(
// If we are in the room then the event should be sent using the SendEvents method. // If we are in the room then the event should be sent using the SendEvents method.
func (c *RoomserverProducer) SendInvite( func (c *RoomserverProducer) SendInvite(
ctx context.Context, inviteEvent gomatrixserverlib.HeaderedEvent, ctx context.Context, inviteEvent gomatrixserverlib.HeaderedEvent,
inviteRoomState []gomatrixserverlib.InviteV2StrippedState,
) error { ) error {
request := api.InputRoomEventsRequest{ request := api.InputRoomEventsRequest{
InputInviteEvents: []api.InputInviteEvent{{ InputInviteEvents: []api.InputInviteEvent{{
Event: inviteEvent, Event: inviteEvent,
InviteRoomState: inviteRoomState, RoomVersion: inviteEvent.RoomVersion,
RoomVersion: inviteEvent.RoomVersion,
}}, }},
} }
var response api.InputRoomEventsResponse var response api.InputRoomEventsResponse

View file

@ -127,7 +127,6 @@ func Invite(
if err = producer.SendInvite( if err = producer.SendInvite(
httpReq.Context(), httpReq.Context(),
signedEvent.Headered(intermediate.RoomVersion), signedEvent.Headered(intermediate.RoomVersion),
inviteStates,
); err != nil { ); err != nil {
util.GetLogger(httpReq.Context()).WithError(err).Error("producer.SendInvite failed") util.GetLogger(httpReq.Context()).WithError(err).Error("producer.SendInvite failed")
return jsonerror.InternalServerError() return jsonerror.InternalServerError()