From 17b2de1263c3a4aaef425c162fb8a0817897037e Mon Sep 17 00:00:00 2001 From: June Date: Thu, 4 Sep 2025 13:12:30 +0200 Subject: [PATCH] add Tuwunel 1.4.0 with v12 support to max version check --- roominfotree/maxroomversion.go | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/roominfotree/maxroomversion.go b/roominfotree/maxroomversion.go index c5bfb4e..ad1ffce 100644 --- a/roominfotree/maxroomversion.go +++ b/roominfotree/maxroomversion.go @@ -185,11 +185,21 @@ func getMaxRoomVersion(serverVersionInfo fclient.Version) string { case "Tuwunel": // https://github.com/matrix-construct/tuwunel - // First version named "Tuwunel": - // https://github.com/matrix-construct/tuwunel/commit/9b658d86b2f49d01ba8d2f5ae7f263a104e8f282#diff-d58f31e506570d0bcb7629251ec1b350c5dde4a205a338349f154f3fd3187e93 - // v11 support at first version named "Tuwunel": - // https://github.com/matrix-construct/tuwunel/blob/9b658d86b2f49d01ba8d2f5ae7f263a104e8f282/src/core/info/room_version.rs - return "v11" + switch { + // v12 support in "v1.4.0". + // https://github.com/matrix-construct/tuwunel/releases/tag/v1.4.0 + // "v1.4.0-rc" has v12 support already as well, but should also just return "1.4.0" for its version. + // https://github.com/matrix-construct/tuwunel/commits/v1.4.0 + // https://github.com/matrix-construct/tuwunel/commits/v1.4.0-rc + case serverVersion.GreaterThanOrEqual(version.Must(version.NewVersion("1.4.0"))): + return "v12" + default: + // First version named "Tuwunel": + // https://github.com/matrix-construct/tuwunel/commit/9b658d86b2f49d01ba8d2f5ae7f263a104e8f282#diff-d58f31e506570d0bcb7629251ec1b350c5dde4a205a338349f154f3fd3187e93 + // v11 support at first version named "Tuwunel": + // https://github.com/matrix-construct/tuwunel/blob/9b658d86b2f49d01ba8d2f5ae7f263a104e8f282/src/core/info/room_version.rs + return "v11" + } default: return "unknown" }