mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-10 07:33:09 -06:00
Handle case where snapshot NID is 0
This commit is contained in:
parent
51275138cb
commit
4e621cf185
|
|
@ -993,7 +993,11 @@ func (d *Database) GetHistoryVisibilityState(ctx context.Context, roomInfo *type
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
eventNIDs, err := d.StateSnapshotTable.BulkSelectStateForHistoryVisibility(ctx, nil, eventStates[0].BeforeStateSnapshotNID, domain)
|
||||
stateSnapshotNID := eventStates[0].BeforeStateSnapshotNID
|
||||
if stateSnapshotNID == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
eventNIDs, err := d.StateSnapshotTable.BulkSelectStateForHistoryVisibility(ctx, nil, stateSnapshotNID, domain)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue