mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 12:52:24 +03:00
Only require room version instead of room info for db.Events() (#3079)
This reduces the API requirements for the Events database to align with what is actually required.
This commit is contained in:
parent
2b34f88fde
commit
a49c9f01e2
16 changed files with 74 additions and 36 deletions
|
@ -571,7 +571,7 @@ func TestRedaction(t *testing.T) {
|
|||
if ev.Type() == spec.MRoomRedaction {
|
||||
nids, err := db.EventNIDs(ctx, []string{ev.Redacts()})
|
||||
assert.NoError(t, err)
|
||||
evs, err := db.Events(ctx, roomInfo, []types.EventNID{nids[ev.Redacts()].EventNID})
|
||||
evs, err := db.Events(ctx, roomInfo.RoomVersion, []types.EventNID{nids[ev.Redacts()].EventNID})
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 1, len(evs))
|
||||
assert.Equal(t, tc.wantRedacted, evs[0].Redacted())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue