monkeeShark/packages/backend/src/remote/activitypub/renderer/follow-relay.ts
syuilo 0e4a111f81 refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00

14 lines
438 B
TypeScript

import config from '@/config/index';
import { Relay } from '@/models/entities/relay';
import { ILocalUser } from '@/models/entities/user';
export function renderFollowRelay(relay: Relay, relayActor: ILocalUser) {
const follow = {
id: `${config.url}/activities/follow-relay/${relay.id}`,
type: 'Follow',
actor: `${config.url}/users/${relayActor.id}`,
object: 'https://www.w3.org/ns/activitystreams#Public'
};
return follow;
}