fix(backend): リストTLに自分のフォロワー限定投稿が含まれない問題を修正

Fix #12110
This commit is contained in:
syuilo 2023-10-22 10:40:53 +09:00
parent fd8d253e1e
commit 72327716ca
3 changed files with 19 additions and 3 deletions

View file

@ -868,7 +868,7 @@ export class NoteCreateService implements OnApplicationShutdown {
if (note.visibility === 'followers') {
// TODO: 重そうだから何とかしたい Set 使う?
userListMemberships = userListMemberships.filter(x => followings.some(f => f.followerId === x.userListUserId));
userListMemberships = userListMemberships.filter(x => x.userListUserId === user.id || followings.some(f => f.followerId === x.userListUserId));
}
// TODO: あまりにも数が多いと redisPipeline.exec に失敗する(理由は不明)ため、3万件程度を目安に分割して実行するようにする