hippofish/src/remote/activitypub/renderer/like.ts
2018-04-08 15:15:22 +09:00

8 lines
263 B
TypeScript

import config from '../../../config';
import { ILocalUser } from '../../../models/user';
export default (user: ILocalUser, note) => ({
type: 'Like',
actor: `${config.url}/users/${user._id}`,
object: note.uri ? note.uri : `${config.url}/notes/${note._id}`
});