mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-12 20:53:24 +01:00
Fix /context with lazy_load_members (#2277)
* Add membership events to the end of the list, to ensure Sytest sees them * Move tests to allowlist * Append to correct list, fix logging message * Add flakey tests to blacklist * Remove flakey tests from whitelist
This commit is contained in:
parent
01d71a767d
commit
a2cf1aaf48
3 changed files with 8 additions and 8 deletions
|
@ -66,7 +66,7 @@ func Context(
|
|||
membershipRes := roomserver.QueryMembershipForUserResponse{}
|
||||
membershipReq := roomserver.QueryMembershipForUserRequest{UserID: device.UserID, RoomID: roomID}
|
||||
if err = rsAPI.QueryMembershipForUser(ctx, &membershipReq, &membershipRes); err != nil {
|
||||
logrus.WithError(err).Error("unable to fo membership")
|
||||
logrus.WithError(err).Error("unable to query membership")
|
||||
return jsonerror.InternalServerError()
|
||||
}
|
||||
|
||||
|
@ -158,17 +158,19 @@ func applyLazyLoadMembers(filter *gomatrixserverlib.RoomEventFilter, eventsAfter
|
|||
}
|
||||
|
||||
newState := []*gomatrixserverlib.HeaderedEvent{}
|
||||
membershipEvents := []*gomatrixserverlib.HeaderedEvent{}
|
||||
for _, event := range state {
|
||||
if event.Type() != gomatrixserverlib.MRoomMember {
|
||||
newState = append(newState, event)
|
||||
} else {
|
||||
// did the user send an event?
|
||||
if x[event.Sender()] {
|
||||
newState = append(newState, event)
|
||||
membershipEvents = append(membershipEvents, event)
|
||||
}
|
||||
}
|
||||
}
|
||||
return newState
|
||||
// Add the membershipEvents to the end of the list, to make Sytest happy
|
||||
return append(newState, membershipEvents...)
|
||||
}
|
||||
|
||||
func parseRoomEventFilter(req *http.Request) (*gomatrixserverlib.RoomEventFilter, error) {
|
||||
|
|
|
@ -24,7 +24,6 @@ Local device key changes get to remote servers with correct prev_id
|
|||
|
||||
# Flakey
|
||||
Local device key changes appear in /keys/changes
|
||||
/context/ with lazy_load_members filter works
|
||||
|
||||
# we don't support groups
|
||||
Remove group category
|
||||
|
@ -32,9 +31,10 @@ Remove group role
|
|||
|
||||
# Flakey
|
||||
AS-ghosted users can use rooms themselves
|
||||
/context/ with lazy_load_members filter works
|
||||
AS-ghosted users can use rooms via AS
|
||||
Events in rooms with AS-hosted room aliases are sent to AS server
|
||||
Inviting an AS-hosted user asks the AS server
|
||||
Accesing an AS-hosted room alias asks the AS server
|
||||
|
||||
# Flakey, need additional investigation
|
||||
Messages that notify from another user increment notification_count
|
||||
|
|
|
@ -515,7 +515,6 @@ AS can create a user with inhibit_login
|
|||
AS can set avatar for ghosted users
|
||||
AS can set displayname for ghosted users
|
||||
Ghost user must register before joining room
|
||||
Inviting an AS-hosted user asks the AS server
|
||||
Can generate a openid access_token that can be exchanged for information about a user
|
||||
Invalid openid access tokens are rejected
|
||||
Requests to userinfo without access tokens are rejected
|
||||
|
@ -661,6 +660,5 @@ Multiple calls to /sync should not cause 500 errors
|
|||
Canonical alias can be set
|
||||
Canonical alias can include alt_aliases
|
||||
Can delete canonical alias
|
||||
Multiple calls to /sync should not cause 500 errors
|
||||
AS can make room aliases
|
||||
Accesing an AS-hosted room alias asks the AS server
|
||||
/context/ with lazy_load_members filter works
|
||||
|
|
Loading…
Reference in a new issue