From b11e82126bead04a206cbbffae0da37563d399c6 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 19 Oct 2020 12:10:13 +0100 Subject: [PATCH] Fix SendEventWithState --- roomserver/api/wrapper.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roomserver/api/wrapper.go b/roomserver/api/wrapper.go index 0cb02a716..9e8219103 100644 --- a/roomserver/api/wrapper.go +++ b/roomserver/api/wrapper.go @@ -41,7 +41,7 @@ func SendEvents( return SendInputRoomEvents(ctx, rsAPI, ires) } -// SendEventWithState writes an event with KindNew to the roomserver +// SendEventWithState writes an event with the specified kind to the roomserver // with the state at the event as KindOutlier before it. Will not send any event that is // marked as `true` in haveEventIDs func SendEventWithState( @@ -60,7 +60,7 @@ func SendEventWithState( continue } ires = append(ires, InputRoomEvent{ - Kind: kind, + Kind: KindOutlier, Event: outlier.Headered(event.RoomVersion), AuthEventIDs: outlier.AuthEventIDs(), }) @@ -72,7 +72,7 @@ func SendEventWithState( } ires = append(ires, InputRoomEvent{ - Kind: KindNew, + Kind: kind, Event: event, AuthEventIDs: event.AuthEventIDs(), HasState: true,