1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-02 16:58:43 +09:00

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

This commit is contained in:
syuilo 2018-09-23 16:05:46 +09:00
parent e4e668b327
commit 49e82adc6c
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -4,6 +4,7 @@ import { getFriendIds } from '../../common/get-friends';
import { pack } from '../../../../models/note'; import { pack } from '../../../../models/note';
import { ILocalUser } from '../../../../models/user'; import { ILocalUser } from '../../../../models/user';
import getParams from '../../get-params'; import getParams from '../../get-params';
import read from '../../../../services/note/read';
export const meta = { export const meta = {
desc: { desc: {
@ -85,6 +86,8 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
sort: sort sort: sort
}); });
mentions.forEach(note => read(user._id, note._id));
// Serialize // Serialize
res(await Promise.all(mentions.map(mention => pack(mention, user)))); res(await Promise.all(mentions.map(mention => pack(mention, user))));
}); });