mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Client API ddoesn't need to send invite room state, the roomserver will work it out
This commit is contained in:
parent
48e3088e90
commit
a82bce9b7b
|
|
@ -105,12 +105,10 @@ 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,
|
||||||
}},
|
}},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue