mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 04:52: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
|
@ -747,6 +747,14 @@ func (d *Database) GetRoomVersionForRoom(
|
|||
)
|
||||
}
|
||||
|
||||
func (d *Database) GetRoomVersionForRoomNID(
|
||||
ctx context.Context, roomNID types.RoomNID,
|
||||
) (gomatrixserverlib.RoomVersion, error) {
|
||||
return d.statements.selectRoomVersionForRoomNID(
|
||||
ctx, nil, roomNID,
|
||||
)
|
||||
}
|
||||
|
||||
type transaction struct {
|
||||
ctx context.Context
|
||||
txn *sql.Tx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue