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