From e8085a9493cfc5036dfa7870b47ad51695d11bab Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 16 Dec 2020 15:10:36 -0600 Subject: [PATCH] MSC2716: Incremental existing history Fix https://github.com/matrix-org/matrix-doc/blob/matthew/msc2716/proposals/2716-importing-history-into-existing-rooms.md --- clientapi/routing/sendevent.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clientapi/routing/sendevent.go b/clientapi/routing/sendevent.go index bfb48f3df0..3d28f1e2da 100644 --- a/clientapi/routing/sendevent.go +++ b/clientapi/routing/sendevent.go @@ -52,6 +52,12 @@ func SendEvent( rsAPI api.RoomserverInternalAPI, txnCache *transactions.Cache, ) util.JSONResponse { + prevEvent := req.URL.Query().Get("prev_event") + + util.GetLogger(req.Context()).WithFields(logrus.Fields{ + "prevEvent": prevEvent, + }).Info("prevEvent") + verReq := api.QueryRoomVersionForRoomRequest{RoomID: roomID} verRes := api.QueryRoomVersionForRoomResponse{} if err := rsAPI.QueryRoomVersionForRoom(req.Context(), &verReq, &verRes); err != nil {