From 98e5e9de4a0f596653fa6a6f9e6555e0a47962e0 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 16 Aug 2025 23:58:52 +0300 Subject: [PATCH] Revert "Allow v12 rooms to be created" This reverts commit d2988096e413607bc36170ad4caf495ffc43b79f. The bridge can handle v12 rooms fine, but creation requires additional considerations Fixes #193 --- guildportal.go | 1 + portal.go | 1 + user.go | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) 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 439cdfd..3a5db83 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 c227490..f209b33 100644 --- a/user.go +++ b/user.go @@ -340,9 +340,11 @@ func (user *User) getSpaceRoom(ptr *id.RoomID, name, topic string, parent id.Roo }, PowerLevelOverride: &event.PowerLevelsEventContent{ Users: map[id.UserID]int{ - user.MXID: 50, + user.bridge.Bot.UserID: 9001, + user.MXID: 50, }, }, + RoomVersion: "11", }) if err != nil {