Support for joining New Groups via invite links

This commit is contained in:
Scott Nonnenberg 2021-01-29 14:16:48 -08:00 committed by GitHub
parent c0510b08a5
commit a48b3e381e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 2532 additions and 381 deletions

View file

@ -25,7 +25,7 @@ export function isSgnlHref(value: string | URL, logger: LoggerType): boolean {
type ParsedSgnlHref =
| { command: null; args: Map<never, never> }
| { command: string; args: Map<string, string> };
| { command: string; args: Map<string, string>; hash: string | undefined };
export function parseSgnlHref(
href: string,
logger: LoggerType
@ -42,5 +42,9 @@ export function parseSgnlHref(
}
});
return { command: url.host, args };
return {
command: url.host,
args,
hash: url.hash ? url.hash.slice(1) : undefined,
};
}