diff --git a/CHANGELOG.md b/CHANGELOG.md index 04e7017001..bcfd7cebcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ - Fix: トークンのないプラグインをアンインストールするときにエラーが出ないように - Fix: 投稿通知がオンでもダイレクト投稿はユーザーに通知されないようにされました - Fix: ユーザタイムラインの「ノート」選択時にリノートが混ざり込んでしまうことがある問題の修正 #12306 +- Fix: LTLに特定条件下にてチャンネルへの投稿が混ざり込む現象を修正 - Fix: ActivityPub: 追加情報のカスタム絵文字がユーザー情報のtagに含まれない問題を修正 - Fix: ActivityPubに関するセキュリティの向上 - Fix: 非公開の投稿に対して返信できないように diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index b1fa34cc9e..02f43d0712 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -180,8 +180,10 @@ export default class extends Endpoint { // eslint- redisTimeline.push(...timeline); } + // fallback to db if (redisTimeline.length === 0) { - // fallback to db + if (!serverSettings.enableFanoutTimelineDbFallback) return []; + return await this.getFromDb({ untilId, sinceId, diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index 24343664af..74ca9cd665 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -155,8 +155,10 @@ export default class extends Endpoint { // eslint- redisTimeline.push(...timeline); } + // fallback to db if (redisTimeline.length === 0) { - // fallback to db + if (!serverSettings.enableFanoutTimelineDbFallback) return []; + return await this.getFromDb({ untilId, sinceId, @@ -185,7 +187,7 @@ export default class extends Endpoint { // eslint- }, me: MiLocalUser | null) { const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) - .andWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)') + .andWhere('(note.visibility = \'public\') AND (note.userHost IS NULL) AND (note.channelId IS NULL)') .innerJoinAndSelect('note.user', 'user') .leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.renote', 'renote') diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index 52e645d932..7091f44b48 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -142,8 +142,10 @@ export default class extends Endpoint { // eslint- redisTimeline.push(...timeline); } + // fallback to db if (redisTimeline.length === 0) { - // fallback to db + if (!serverSettings.enableFanoutTimelineDbFallback) return []; + return await this.getFromDb({ untilId, sinceId, diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index 2b22dae29f..0b9c5a9dc1 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -161,8 +161,10 @@ export default class extends Endpoint { // eslint- redisTimeline.push(...timeline); } + // fallback to db if (redisTimeline.length === 0) { - // fallback to db + if (!serverSettings.enableFanoutTimelineDbFallback) return []; + return await this.getFromDb(list, { untilId, sinceId, diff --git a/packages/backend/src/server/api/stream/channels/local-timeline.ts b/packages/backend/src/server/api/stream/channels/local-timeline.ts index 9dd05b9b08..1388f186ff 100644 --- a/packages/backend/src/server/api/stream/channels/local-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts @@ -52,7 +52,7 @@ class LocalTimelineChannel extends Channel { if (note.user.host !== null) return; if (note.visibility !== 'public') return; - if (note.channelId != null && !this.followingChannels.has(note.channelId)) return; + if (note.channelId != null) return; // 関係ない返信は除外 if (note.reply && this.user && !this.following[note.userId]?.withReplies && !this.withReplies) {