2021-08-19 21:55:45 +09:00
|
|
|
import config from '@/config/index';
|
|
|
|
import { Relay } from '@/models/entities/relay';
|
|
|
|
import { ILocalUser } from '@/models/entities/user';
|
2020-05-10 18:42:31 +09:00
|
|
|
|
|
|
|
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}`,
|
2021-12-09 23:58:30 +09:00
|
|
|
object: 'https://www.w3.org/ns/activitystreams#Public',
|
2020-05-10 18:42:31 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
return follow;
|
|
|
|
}
|