Prepare for new RoomId format

See MSC4291
This commit is contained in:
Tobias Fella
2025-07-16 17:46:44 +02:00
committed by Tobias Fella
parent 976af783e2
commit edf5d55da4
2 changed files with 11 additions and 34 deletions

View File

@@ -404,7 +404,9 @@ void RoomManager::joinRoom(Quotient::Connection *account, const QString &roomAli
// If no one gives us a homeserver suggestion, try the server specified in the alias/id.
// Otherwise joining a remote room not on our homeserver will fail.
if (vias.empty()) {
// This is a hack and we're not supposed to do it. With room ids not containing the server going forward, it won't work anymore for new room versions.
// FIXME: Let's keep it around anyway for now, remove it at some point, though
if (vias.empty() && roomAliasOrId.contains(':'_L1)) {
vias.append(roomAliasOrId.mid(roomAliasOrId.lastIndexOf(':'_L1) + 1));
}