chore (backend): address openvibe's invalid acct format

This commit is contained in:
naskya 2024-07-16 15:52:12 +09:00
parent c127d01dbf
commit 30cf1068b3
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -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