regex is hard

This commit is contained in:
Travis Ralston
2025-07-16 12:30:19 -06:00
parent 3e521505c0
commit f8c30eabde
+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);
} }