chore (backend): address openvibe's invalid acct format
This commit is contained in:
parent
c127d01dbf
commit
30cf1068b3
1 changed files with 1 additions and 0 deletions
|
@ -306,6 +306,7 @@ export class UserHelpers {
|
|||
}
|
||||
|
||||
public static async getUserFromAcct(acct: string): Promise<User> {
|
||||
if (acct.startsWith("@")) acct = acct.slice(1);
|
||||
const split = acct.toLowerCase().split("@");
|
||||
if (split.length > 2) throw new Error("Invalid acct");
|
||||
return split[1] == null
|
||||
|
|
Loading…
Reference in a new issue