rudeshark.net/src/remote/activitypub/renderer/like.ts

9 lines
263 B
TypeScript
Raw Normal View History

2018-04-07 10:05:14 +02:00
import config from '../../../config';
2018-04-07 23:55:26 +02:00
import { ILocalUser } from '../../../models/user';
2018-04-07 10:05:14 +02:00
2018-04-08 08:15:22 +02:00
export default (user: ILocalUser, note) => ({
type: 'Like',
actor: `${config.url}/users/${user._id}`,
object: note.uri ? note.uri : `${config.url}/notes/${note._id}`
});