mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
sqlstatestore: handle nulls in members_fetched
This commit is contained in:
parent
e17cb83855
commit
8a8163106d
1 changed files with 1 additions and 1 deletions
|
|
@ -303,7 +303,7 @@ func (store *SQLStateStore) ClearCachedMembers(ctx context.Context, roomID id.Ro
|
|||
}
|
||||
|
||||
func (store *SQLStateStore) HasFetchedMembers(ctx context.Context, roomID id.RoomID) (fetched bool, err error) {
|
||||
err = store.QueryRow(ctx, "SELECT members_fetched FROM mx_room_state WHERE room_id=$1", roomID).Scan(&fetched)
|
||||
err = store.QueryRow(ctx, "SELECT COALESCE(members_fetched, false) FROM mx_room_state WHERE room_id=$1", roomID).Scan(&fetched)
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
err = nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue