0
0

fix: アンテナの既読 (#7803)

from: a89742319c
This commit is contained in:
sousuke0422 2021-09-18 13:30:28 +09:00 committed by GitHub
parent 4f63eb0c7e
commit 07bb8067ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
import $ from 'cafy';
import { ID } from '@/misc/cafy-id';
import define from '../../define';
import readNote from '@/services/note/read';
import { Antennas, Notes, AntennaNotes } from '@/models/index';
import { makePaginationQuery } from '../../common/make-pagination-query';
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
@ -84,5 +85,9 @@ export default define(meta, async (ps, user) => {
.take(ps.limit!)
.getMany();
if (notes.length > 0) {
readNote(user.id, notes);
}
return await Notes.packMany(notes, user);
});