mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Room server changes for room versions (#930)
* Rearrange state package a bit, add some code to look up the right state resolution algorithm * Remove shared * Add GetRoomVersionForRoomNID * Try to use room version to get correct state resolution algorithm * Fix room joins over federation * nolint resolveConflictsV2 because all attempts to break it up so far just result in it being awfully less obvious how it works * Rename Prepare to NewStateResolution * Update comments * Re-add missing tests
This commit is contained in:
parent
944d454cb0
commit
f2030286de
12 changed files with 1122 additions and 1025 deletions
|
@ -20,6 +20,7 @@ import (
|
|||
"context"
|
||||
|
||||
"github.com/matrix-org/dendrite/roomserver/types"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
)
|
||||
|
||||
// A RoomStateDatabase has the storage APIs needed to load state from the database
|
||||
|
@ -61,4 +62,6 @@ type RoomStateDatabase interface {
|
|||
Events(ctx context.Context, eventNIDs []types.EventNID) ([]types.Event, error)
|
||||
// Look up snapshot NID for an event ID string
|
||||
SnapshotNIDFromEventID(ctx context.Context, eventID string) (types.StateSnapshotNID, error)
|
||||
// Look up a room version from the room NID.
|
||||
GetRoomVersionForRoomNID(ctx context.Context, roomNID types.RoomNID) (gomatrixserverlib.RoomVersion, error)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue