mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 06:43:09 -06:00
Bugfixes
This commit is contained in:
parent
1ea9ed507c
commit
fb787ed671
|
|
@ -79,10 +79,10 @@ const selectRoomIDsSQL = "" +
|
|||
"SELECT room_id FROM roomserver_rooms"
|
||||
|
||||
const bulkSelectRoomIDsSQL = "" +
|
||||
"SELECT room_id FROM roomserver_rooms WHERE room_nid IN ($1)"
|
||||
"SELECT room_id FROM roomserver_rooms WHERE room_nid = ANY($1)"
|
||||
|
||||
const bulkSelectRoomNIDsSQL = "" +
|
||||
"SELECT room_nid FROM roomserver_rooms WHERE room_id IN ($1)"
|
||||
"SELECT room_nid FROM roomserver_rooms WHERE room_id = ANY($1)"
|
||||
|
||||
type roomStatements struct {
|
||||
insertRoomNIDStmt *sql.Stmt
|
||||
|
|
|
|||
|
|
@ -774,6 +774,9 @@ func (d *Database) GetRoomsByMembership(ctx context.Context, userID, membership
|
|||
}
|
||||
stateKeyNID, err := d.EventStateKeysTable.SelectEventStateKeyNID(ctx, nil, userID)
|
||||
if err != nil {
|
||||
if err == sql.ErrNoRows {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, fmt.Errorf("GetRoomsByMembership: cannot map user ID to state key NID: %w", err)
|
||||
}
|
||||
roomNIDs, err := d.MembershipTable.SelectRoomsWithMembership(ctx, stateKeyNID, membershipState)
|
||||
|
|
|
|||
Loading…
Reference in a new issue