From 45abdcaeb967ea54e1edbe3c1f1d73d1a82a2904 Mon Sep 17 00:00:00 2001 From: Devon Johnson Date: Sat, 17 Oct 2020 21:07:34 -0700 Subject: [PATCH] Send state after event, not current Signed-off-by: Devon Johnson --- clientapi/routing/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientapi/routing/state.go b/clientapi/routing/state.go index 2a424cbe..f69b54bb 100644 --- a/clientapi/routing/state.go +++ b/clientapi/routing/state.go @@ -141,7 +141,7 @@ func OnIncomingStateRequest(ctx context.Context, device *userapi.Device, rsAPI a util.GetLogger(ctx).WithError(err).Error("Failed to QueryMembershipForUser") return jsonerror.InternalServerError() } - for _, ev := range stateRes.StateEvents { + for _, ev := range stateAfterRes.StateEvents { stateEvents = append( stateEvents, gomatrixserverlib.HeaderedToClientEvent(ev, gomatrixserverlib.FormatAll),