Refactoring

This commit is contained in:
syuilo
2018-10-23 05:36:35 +09:00
parent c8b6b6e44f
commit 7c7f32d9a6
32 changed files with 1125 additions and 1111 deletions

View File

@@ -8,7 +8,7 @@ import watch from '../watch';
import renderLike from '../../../remote/activitypub/renderer/like';
import { deliver } from '../../../queue';
import pack from '../../../remote/activitypub/renderer';
import { perUserReactionsStats } from '../../stats';
import perUserReactionsChart from '../../../chart/per-user-reactions';
export default async (user: IUser, note: INote, reaction: string) => new Promise(async (res, rej) => {
// Myself
@@ -44,7 +44,7 @@ export default async (user: IUser, note: INote, reaction: string) => new Promise
$inc: inc
});
perUserReactionsStats.update(user, note);
perUserReactionsChart.update(user, note);
publishNoteStream(note._id, 'reacted', {
reaction: reaction,