mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix(api): 🐛 Fix lookup endpoints thinking local user is remote
This commit is contained in:
parent
ace6921447
commit
da369e604c
2 changed files with 12 additions and 2 deletions
10
utils/api.ts
10
utils/api.ts
|
|
@ -106,6 +106,16 @@ export const userAddressValidator = createRegExp(
|
|||
[global],
|
||||
);
|
||||
|
||||
export const userAddressValidatorRemote = createRegExp(
|
||||
maybe("@"),
|
||||
oneOrMore(anyOf(letter.lowercase, digit, charIn("-_"))).groupedAs(
|
||||
"username",
|
||||
),
|
||||
exactly("@"),
|
||||
oneOrMore(anyOf(letter, digit, charIn("_-.:"))).groupedAs("domain"),
|
||||
[global],
|
||||
);
|
||||
|
||||
export const webfingerMention = createRegExp(
|
||||
exactly("acct:"),
|
||||
oneOrMore(anyOf(letter, digit, charIn("-_"))).groupedAs("username"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue