fix(backend): フォローしているユーザーからの自分の投稿への返信がタイムラインに含まれない問題を修正

This commit is contained in:
syuilo 2023-10-11 08:18:00 +09:00
parent 26b7112b20
commit 1f0c27edf2
3 changed files with 74 additions and 4 deletions

View file

@ -868,8 +868,8 @@ export class NoteCreateService implements OnApplicationShutdown {
// 基本的にvisibleUserIdsには自身のidが含まれている前提であること
if (note.visibility === 'specified' && !note.visibleUserIds.some(v => v === following.followerId)) continue;
// 自分自身以外への返信
if (note.replyId && note.replyUserId !== note.userId) {
// 自分自身への返信 or そのフォロワーへの返信」のどちらでもない場合
if (note.replyId && !(note.replyUserId === note.userId || note.replyUserId === following.followerId)) {
if (!following.withReplies) continue;
}
@ -886,8 +886,8 @@ export class NoteCreateService implements OnApplicationShutdown {
!note.visibleUserIds.some(v => v === userListMembership.userListUserId)
) continue;
// 自分自身以外への返信
if (note.replyId && note.replyUserId !== note.userId) {
// 自分自身への返信 or そのリストの作成者への返信」のどちらでもない場合
if (note.replyId && !(note.replyUserId === note.userId || note.replyUserId === userListMembership.userListUserId)) {
if (!userListMembership.withReplies) continue;
}