summaryrefslogtreecommitdiff
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
parentUpdate CHANGELOG.md (diff)
downloadmisskey-2de4d3329d0d9ea9b014b773156e55a976904a8c.tar.gz
misskey-2de4d3329d0d9ea9b014b773156e55a976904a8c.tar.bz2
misskey-2de4d3329d0d9ea9b014b773156e55a976904a8c.zip
Fix: フォローしたユーザが、自分のフォローしていないチャンネルにノートを投稿した時、そのノートがHTLで見えてしまう (#12186)
* #12181 の問題に対処 「ユーザー・チャンネルともにフォローあり」のときの絞り込みに不備があり、フォローしているユーザの投稿であればチャンネルのフォロー関係なく通過するようになってしまっていた * fix CHANGELOG.md --------- Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com>
-rw-r--r--CHANGELOG.md2
-rw-r--r--packages/backend/src/server/api/endpoints/notes/timeline.ts6
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e4ce5bede..abfb0692bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -49,7 +49,7 @@
- Fix: RedisへのTLキャッシュが有効の場合にHTL/LTL/STLが空になることがある問題を修正
- Fix: STLでフォローしていないチャンネルが取得される問題を修正
- Fix: `hashtags/trend`にてRedisからトレンドの情報が取得できない際にInternal Server Errorになる問題を修正
-- Fix: HTLをリロードまたは遡行したとき、フォローしているチャンネルのノートが含まれない問題を修正 #11765
+- Fix: HTLをリロードまたは遡行したとき、フォローしているチャンネルのノートが含まれない問題を修正 #11765 #12181
## 2023.10.2
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) {