convert Authorized Fetch to a setting and add support for hybrid mode (essential metadata only)

This commit is contained in:
Hazelnoot 2025-02-21 22:04:36 -05:00
parent e3d949ced6
commit a35c2f214b
28 changed files with 517 additions and 103 deletions

View file

@ -29,7 +29,7 @@ export class CreateSystemUserService {
}
@bindThis
public async createSystemUser(username: string): Promise<MiUser> {
public async createSystemUser(username: string, data?: Partial<MiUser>): Promise<MiUser> {
const password = randomUUID();
// Generate hash of password
@ -63,6 +63,7 @@ export class CreateSystemUserService {
isExplorable: false,
approved: true,
isBot: true,
...(data ?? {}),
}).then(x => transactionalEntityManager.findOneByOrFail(MiUser, x.identifiers[0]));
await transactionalEntityManager.insert(MiUserKeypair, {