aboutsummaryrefslogtreecommitdiff
path: root/roomserver/state
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2023-04-21 17:06:29 +0100
committerGitHub <noreply@github.com>2023-04-21 17:06:29 +0100
commit1647213facae52e2c8889fbc848ffc5d3a5792f0 (patch)
tree684206b99582df20ae144e19db37591cc35b789d /roomserver/state
parent71eeccf34a2ea4434c315c19778d80a7b2469270 (diff)
Implement new RoomVersionImpl API (#3062)
As outlined in https://github.com/matrix-org/gomatrixserverlib/pull/368 The main change Dendrite side is that `RoomVersion` no longer has any methods on it. Instead, you need to bounce via `gmsl.GetRoomVersion`. It's very interesting to see where exactly Dendrite cares about this. For some places it's creating events (fine) but others are way more specific. Those areas will need to migrate to GMSL at some point.
Diffstat (limited to 'roomserver/state')
-rw-r--r--roomserver/state/state.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/roomserver/state/state.go b/roomserver/state/state.go
index c3842784..d20877b4 100644
--- a/roomserver/state/state.go
+++ b/roomserver/state/state.go
@@ -878,10 +878,12 @@ func (v *StateResolution) resolveConflicts(
trace, ctx := internal.StartRegion(ctx, "StateResolution.resolveConflicts")
defer trace.EndRegion()
- stateResAlgo, err := version.StateResAlgorithm()
+ verImpl, err := gomatrixserverlib.GetRoomVersion(version)
if err != nil {
return nil, err
}
+
+ stateResAlgo := verImpl.StateResAlgorithm()
switch stateResAlgo {
case gomatrixserverlib.StateResV1:
return v.resolveConflictsV1(ctx, notConflicted, conflicted)