Use a single storage.Database interface (#978)
This commit is contained in:
parent
c30b12b5a1
commit
a202d88fe5
11 changed files with 65 additions and 204 deletions
|
|
@ -18,6 +18,7 @@ import (
|
|||
"context"
|
||||
"sort"
|
||||
|
||||
"github.com/matrix-org/dendrite/roomserver/storage"
|
||||
"github.com/matrix-org/dendrite/roomserver/types"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
)
|
||||
|
|
@ -26,7 +27,7 @@ import (
|
|||
// Returns the numeric IDs for the auth events.
|
||||
func checkAuthEvents(
|
||||
ctx context.Context,
|
||||
db RoomEventDatabase,
|
||||
db storage.Database,
|
||||
event gomatrixserverlib.HeaderedEvent,
|
||||
authEventIDs []string,
|
||||
) ([]types.EventNID, error) {
|
||||
|
|
@ -127,7 +128,7 @@ func (ae *authEvents) lookupEvent(typeNID types.EventTypeNID, stateKey string) *
|
|||
// loadAuthEvents loads the events needed for authentication from the supplied room state.
|
||||
func loadAuthEvents(
|
||||
ctx context.Context,
|
||||
db RoomEventDatabase,
|
||||
db storage.Database,
|
||||
needed gomatrixserverlib.StateNeeded,
|
||||
state []types.StateEntry,
|
||||
) (result authEvents, err error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue