paricafe/src/remote/activitypub/renderer/like.ts

10 lines
215 B
TypeScript
Raw Normal View History

2018-04-07 03:05:14 -05:00
import config from '../../../config';
2018-04-07 12:30:37 -05:00
export default (user, note) => {
2018-04-07 03:05:14 -05:00
return {
type: 'Like',
actor: `${config.url}/@${user.username}`,
2018-04-07 12:30:37 -05:00
object: note.uri ? note.uri : `${config.url}/notes/${note._id}`
2018-04-07 03:05:14 -05:00
};
};