Compare commits
1 commit
main
...
danilafe/s
Author | SHA1 | Date | |
---|---|---|---|
|
e55ae3710d |
1 changed files with 9 additions and 2 deletions
11
src/Link.js
11
src/Link.js
|
@ -109,10 +109,17 @@ export class Link {
|
|||
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;
|
||||
matches = USERID_PATTERN.exec(identifier);
|
||||
matches = USERID_PATTERN.exec(identifier) || USERID_PATTERN.exec(`${identifier}/${eventId}`);
|
||||
if (matches) {
|
||||
const server = matches[2];
|
||||
const localPart = matches[1];
|
||||
|
|
Loading…
Reference in a new issue