From 49e82adc6c70c19de0897fc7768fd5e22a8a89f3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 23 Sep 2018 16:05:46 +0900 Subject: [PATCH] =?UTF-8?q?mentions=E3=82=92=E8=AA=AD=E3=81=BF=E8=BE=BC?= =?UTF-8?q?=E3=82=80=E3=81=A8=E3=81=8D=E3=82=82=E6=97=A2=E8=AA=AD=E3=81=AB?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/endpoints/notes/mentions.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/api/endpoints/notes/mentions.ts b/src/server/api/endpoints/notes/mentions.ts index 8675a9f562..d8d05b78ec 100644 --- a/src/server/api/endpoints/notes/mentions.ts +++ b/src/server/api/endpoints/notes/mentions.ts @@ -4,6 +4,7 @@ import { getFriendIds } from '../../common/get-friends'; import { pack } from '../../../../models/note'; import { ILocalUser } from '../../../../models/user'; import getParams from '../../get-params'; +import read from '../../../../services/note/read'; export const meta = { desc: { @@ -85,6 +86,8 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) = sort: sort }); + mentions.forEach(note => read(user._id, note._id)); + // Serialize res(await Promise.all(mentions.map(mention => pack(mention, user)))); });