diff options
author | devonh <devon.dmytro@gmail.com> | 2023-06-06 20:55:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-06 20:55:18 +0000 |
commit | 7a1fd7f512ce06a472a2051ee63eae4a270eb71a (patch) | |
tree | 20128b0d3f7c69dd776aa7b2b9bc3194dda7dd75 /cmd/resolve-state | |
parent | 725ff5567d2a3bc9992b065e72ccabefb595ec1c (diff) |
PDU Sender split (#3100)
Initial cut of splitting PDU Sender into SenderID & looking up UserID where required.
Diffstat (limited to 'cmd/resolve-state')
-rw-r--r-- | cmd/resolve-state/main.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/resolve-state/main.go b/cmd/resolve-state/main.go index 3a4255ba..36040309 100644 --- a/cmd/resolve-state/main.go +++ b/cmd/resolve-state/main.go @@ -18,6 +18,7 @@ import ( "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib" + "github.com/matrix-org/gomatrixserverlib/spec" ) // This is a utility for inspecting state snapshots and running state resolution @@ -182,7 +183,9 @@ func main() { fmt.Println("Resolving state") var resolved Events resolved, err = gomatrixserverlib.ResolveConflicts( - gomatrixserverlib.RoomVersion(*roomVersion), events, authEvents, + gomatrixserverlib.RoomVersion(*roomVersion), events, authEvents, func(roomID, senderID string) (*spec.UserID, error) { + return roomserverDB.GetUserIDForSender(ctx, roomID, senderID) + }, ) if err != nil { panic(err) |