From 111824486b291ab3a8dabdf2a01909dfe357bd25 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 15 Jul 2025 14:19:16 +0300 Subject: [PATCH] Hardcode v11 for new rooms Upcoming breaking changes in room v12 prevent safely using the default room version and security embargoes prevent fixing them ahead of time. --- guildportal.go | 1 + portal.go | 1 + user.go | 1 + 3 files changed, 3 insertions(+) diff --git a/guildportal.go b/guildportal.go index 8230361..d7be670 100644 --- a/guildportal.go +++ b/guildportal.go @@ -205,6 +205,7 @@ func (guild *Guild) CreateMatrixRoom(user *User, meta *discordgo.Guild) error { Preset: "private_chat", InitialState: initialState, CreationContent: creationContent, + RoomVersion: "11", }) if err != nil { guild.log.Warnln("Failed to create room:", err) diff --git a/portal.go b/portal.go index 94a2cf7..bb4af98 100644 --- a/portal.go +++ b/portal.go @@ -489,6 +489,7 @@ func (portal *Portal) CreateMatrixRoom(user *User, channel *discordgo.Channel) e IsDirect: portal.IsPrivateChat(), InitialState: initialState, CreationContent: creationContent, + RoomVersion: "11", } if !portal.shouldSetDMRoomMetadata() && !portal.FriendNick { req.Name = "" diff --git a/user.go b/user.go index 29653aa..f209b33 100644 --- a/user.go +++ b/user.go @@ -344,6 +344,7 @@ func (user *User) getSpaceRoom(ptr *id.RoomID, name, topic string, parent id.Roo user.MXID: 50, }, }, + RoomVersion: "11", }) if err != nil {