Merge pull request #384 from matrix-org/travis/v12-v2

Fix capture group index on non-v12 rooms
This commit is contained in:
Travis Ralston
2025-07-16 12:32:01 -06:00
committed by GitHub
+1 -1
View File
@@ -152,7 +152,7 @@ export class Link {
} }
matches = ROOMID_PATTERN.exec(identifier); matches = ROOMID_PATTERN.exec(identifier);
if (matches) { if (matches) {
const server = matches[2]; const server = matches[3]; // group 2 is an optional over `:domain`, group 3 is just `domain`
const localPart = matches[1]; const localPart = matches[1];
return new Link(clientId, viaServers, IdentifierKind.RoomId, localPart, server, webInstances, eventId); return new Link(clientId, viaServers, IdentifierKind.RoomId, localPart, server, webInstances, eventId);
} }