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

ハイライトでミュートしているユーザーの投稿が含まれる問題を修正

parent ed0fdadd
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ ChangeLog
unreleased
----------
* デッキでユーザーを表示したときにタイムラインが残存する問題を修正
* ハイライトでミュートしているユーザーの投稿が含まれる問題を修正
10.87.5
----------
......
......@@ -2,6 +2,7 @@ import $ from 'cafy';
import Note from '../../../../models/note';
import { packMany } from '../../../../models/note';
import define from '../../define';
import { getHideUserIds } from '../../common/get-hide-users';
export const meta = {
desc: {
......@@ -25,6 +26,8 @@ export const meta = {
export default define(meta, (ps, user) => new Promise(async (res, rej) => {
const day = 1000 * 60 * 60 * 24 * 2;
const hideUserIds = await getHideUserIds(user);
const notes = await Note
.find({
createdAt: {
......@@ -32,7 +35,8 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => {
},
deletedAt: null,
visibility: { $in: ['public', 'home'] },
'_user.host': null
'_user.host': null,
...(hideUserIds && hideUserIds.length > 0 ? { userId: { $nin: hideUserIds } } : {})
}, {
limit: ps.limit,
sort: {
......
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