Merge pull request #384 from matrix-org/travis/v12-v2
Fix capture group index on non-v12 rooms
This commit is contained in:
+1
-1
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user