summaryrefslogtreecommitdiff
path: root/packages/backend/src/server
diff options
context:
space:
mode:
authorおさむのひと <46447427+samunohito@users.noreply.github.com>2023-10-30 08:19:27 +0900
committerGitHub <noreply@github.com>2023-10-30 08:19:27 +0900
commit2de4d3329d0d9ea9b014b773156e55a976904a8c (patch)
tree8a5c2411286477077f0ca17018ff38683fb3fe30 /packages/backend/src/server
parentUpdate CHANGELOG.md (diff)
downloadsharkey-2de4d3329d0d9ea9b014b773156e55a976904a8c.tar.gz
sharkey-2de4d3329d0d9ea9b014b773156e55a976904a8c.tar.bz2
sharkey-2de4d3329d0d9ea9b014b773156e55a976904a8c.zip
Fix: フォローしたユーザが、自分のフォローしていないチャンネルにノートを投稿した時、そのノートがHTLで見えてしまう (#12186)
* #12181 の問題に対処 「ユーザー・チャンネルともにフォローあり」のときの絞り込みに不備があり、フォローしているユーザの投稿であればチャンネルのフォロー関係なく通過するようになってしまっていた * fix CHANGELOG.md --------- Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/server')
-rw-r--r--packages/backend/src/server/api/endpoints/notes/timeline.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts
index e048bc4dd2..5016bd3acb 100644
--- a/packages/backend/src/server/api/endpoints/notes/timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts
@@ -183,7 +183,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const followingChannelIds = followingChannels.map(x => x.followeeId);
query.andWhere(new Brackets(qb => {
qb
- .where('note.userId IN (:...meOrFolloweeIds)', { meOrFolloweeIds: meOrFolloweeIds })
+ .where(new Brackets(qb2 => {
+ qb2
+ .where('note.userId IN (:...meOrFolloweeIds)', { meOrFolloweeIds: meOrFolloweeIds })
+ .andWhere('note.channelId IS NULL');
+ }))
.orWhere('note.channelId IN (:...followingChannelIds)', { followingChannelIds });
}));
} else if (followees.length > 0) {