Skip to content
Snippets Groups Projects
Unverified Commit 49e82adc authored by syuilo's avatar syuilo
Browse files

mentionsを読み込むときも既読にするように

parent e4e668b3
No related branches found
No related tags found
No related merge requests found
......@@ -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))));
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment