Skip to content
Snippets Groups Projects
Commit e55ae371 authored by Danila Fedorin's avatar Danila Fedorin
Browse files

Handle slashes in usernames (but not anything else)

parent 88116bdf
Branches
No related tags found
No related merge requests found
...@@ -109,10 +109,17 @@ export class Link { ...@@ -109,10 +109,17 @@ export class Link {
linkStr = linkStr.substr(2); linkStr = linkStr.substr(2);
} }
const [identifier, eventId] = linkStr.split("/"); const lastSlash = linkStr.lastIndexOf("/");
let identifier, eventId;
if (lastSlash !== -1) {
identifier = linkStr.substring(0, lastSlash);
eventId = linkStr.substring(lastSlash+1);
} else {
identifier = linkStr;
}
let matches; let matches;
matches = USERID_PATTERN.exec(identifier); matches = USERID_PATTERN.exec(identifier) || USERID_PATTERN.exec(`${identifier}/${eventId}`);
if (matches) { if (matches) {
const server = matches[2]; const server = matches[2];
const localPart = matches[1]; const localPart = matches[1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment