2021-03-23 17:43:07 +09:00
|
|
|
import config from '@/config';
|
2020-05-10 18:42:31 +09:00
|
|
|
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;
|
|
|
|
}
|