mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-23 12:33:38 +00:00
ActivityPubでリモートのオブジェクトをGETするときのリクエストをHTTP Signatureで署名するオプション (#6731)
* Sign ActivityPub GET * Fix v12, v12.48.0 UI bug
This commit is contained in:
17
src/services/instance-actor.ts
Normal file
17
src/services/instance-actor.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { createSystemUser } from './create-system-user';
|
||||
import { ILocalUser } from '../models/entities/user';
|
||||
import { Users } from '../models';
|
||||
|
||||
const ACTOR_USERNAME = 'instance.actor' as const;
|
||||
|
||||
export async function getInstanceActor(): Promise<ILocalUser> {
|
||||
const user = await Users.findOne({
|
||||
host: null,
|
||||
username: ACTOR_USERNAME
|
||||
});
|
||||
|
||||
if (user) return user as ILocalUser;
|
||||
|
||||
const created = await createSystemUser(ACTOR_USERNAME);
|
||||
return created as ILocalUser;
|
||||
}
|
||||
Reference in New Issue
Block a user