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