From 1dcc89689353b5548ac16069122a9e1b2afc7371 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 2 Jan 2018 17:06:12 +0000 Subject: [PATCH] Make it build --- .../matrix-org/dendrite/roomserver/input/latest_events.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/roomserver/input/latest_events.go b/src/github.com/matrix-org/dendrite/roomserver/input/latest_events.go index 6e91a988..d11f7363 100644 --- a/src/github.com/matrix-org/dendrite/roomserver/input/latest_events.go +++ b/src/github.com/matrix-org/dendrite/roomserver/input/latest_events.go @@ -57,16 +57,19 @@ func (e *EventSender) Send( func (e *EventSender) SendMany( ctx context.Context, roomNID types.RoomNID, + roomID string, events []EventSenderValue, ) (err error) { - e.linearizer.Await(event.RoomID(), func() { + e.linearizer.Await(roomID, func() { for i := range events { - err = updateLatestEvents(ctx, e.db, e.outputWriter, roomNID, stateAtEvent, event, sendAsServer, transactionID) + err = updateLatestEvents(ctx, e.db, e.outputWriter, roomNID, events[i].stateAtEvent, events[i].event, events[i].sendAsServer, events[i].transactionID) if err != nil { return } } }) + + return } // updateLatestEvents updates the list of latest events for this room in the database and writes the