diff options
author | Kegsay <kegan@matrix.org> | 2020-04-29 18:41:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 18:41:45 +0100 |
commit | 4ad52c67cacc21997f49decd57e3105beb8ab62d (patch) | |
tree | e6606ee4fa49b9e62940c04a287c68e81c2b0749 /roomserver/state | |
parent | 458b3647815f0f2c6930611961431a9fb4390fba (diff) |
Honour history_visibility when backfilling (#990)
* Make backfill work for shared history visibility
* fetch missing state on backfill to remember snapshots correctly
* Fix gmsl to not mux in auth events into room state
* Whoops
* Linting
Diffstat (limited to 'roomserver/state')
-rw-r--r-- | roomserver/state/state.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/roomserver/state/state.go b/roomserver/state/state.go index 389c9440..9b005ee6 100644 --- a/roomserver/state/state.go +++ b/roomserver/state/state.go @@ -86,7 +86,10 @@ func (v StateResolution) LoadStateAtEvent( ) ([]types.StateEntry, error) { snapshotNID, err := v.db.SnapshotNIDFromEventID(ctx, eventID) if err != nil { - return nil, err + return nil, fmt.Errorf("LoadStateAtEvent.SnapshotNIDFromEventID failed for event %s : %s", eventID, err) + } + if snapshotNID == 0 { + return nil, fmt.Errorf("LoadStateAtEvent.SnapshotNIDFromEventID(%s) returned 0 NID, was this event stored?", eventID) } stateEntries, err := v.LoadStateAtSnapshot(ctx, snapshotNID) |