mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
mentionsを読み込むときも既読にするように
This commit is contained in:
parent
b2215c8bdc
commit
c8461d5581
1 changed files with 3 additions and 0 deletions
|
@ -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))));
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue