Send state after event, not current

Signed-off-by: Devon Johnson <djohnson1865@gmail.com>
This commit is contained in:
Devon Johnson 2020-10-17 21:07:34 -07:00 committed by Neil Alexander
parent 6e63df1d9a
commit 45abdcaeb9
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -141,7 +141,7 @@ func OnIncomingStateRequest(ctx context.Context, device *userapi.Device, rsAPI a
util.GetLogger(ctx).WithError(err).Error("Failed to QueryMembershipForUser") util.GetLogger(ctx).WithError(err).Error("Failed to QueryMembershipForUser")
return jsonerror.InternalServerError() return jsonerror.InternalServerError()
} }
for _, ev := range stateRes.StateEvents { for _, ev := range stateAfterRes.StateEvents {
stateEvents = append( stateEvents = append(
stateEvents, stateEvents,
gomatrixserverlib.HeaderedToClientEvent(ev, gomatrixserverlib.FormatAll), gomatrixserverlib.HeaderedToClientEvent(ev, gomatrixserverlib.FormatAll),