Modify /state/{eventType}/{stateKey} to return the event at the time the user left (#1222)

* Modify /state/{eventType}/{stateKey} to return the event at the time the user left

Or live, depending on their current state. Hopefully fixes some sytests!

* Linting

* Set HasBeenInRoom

* Fix cases for world-readable history visibility

* Fix bug in finding the requested state event

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
Kegsay 2020-07-28 10:09:10 +01:00 committed by GitHub
parent 83f038e12b
commit c632867135
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 136 additions and 22 deletions

View file

@ -226,6 +226,7 @@ func (r *RoomserverInternalAPI) QueryMembershipForUser(
}
response.IsInRoom = stillInRoom
response.HasBeenInRoom = true
evs, err := r.DB.Events(ctx, []types.EventNID{membershipEventNID})
if err != nil {