summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorおさむのひと <46447427+samunohito@users.noreply.github.com>2023-11-16 16:02:46 +0900
committerGitHub <noreply@github.com>2023-11-16 16:02:46 +0900
commit1eb769dbe8e52070f8b3e2e0411b4943bd7d69a9 (patch)
treeb10b2134412e92f0a6ccfa1f2db766fb5ff5b298
parentenhance(backend): make ftt db fallback configurable (diff)
downloadsharkey-1eb769dbe8e52070f8b3e2e0411b4943bd7d69a9.tar.gz
sharkey-1eb769dbe8e52070f8b3e2e0411b4943bd7d69a9.tar.bz2
sharkey-1eb769dbe8e52070f8b3e2e0411b4943bd7d69a9.zip
LTLに特定条件下でチャンネル投稿が混ざり込む現象の修正 (#12347)
* LTLにチャンネル投稿を含まないように修正 * fix CHANGELOG.md --------- Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com>
-rw-r--r--CHANGELOG.md1
-rw-r--r--packages/backend/src/server/api/endpoints/notes/local-timeline.ts2
-rw-r--r--packages/backend/src/server/api/stream/channels/local-timeline.ts2
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4c4ae2ae3a..a87de8f662 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,6 +39,7 @@
- Fix: ActivityPub: 追加情報のカスタム絵文字がユーザー情報のtagに含まれない問題を修正
- Fix: ActivityPubに関するセキュリティの向上
- Fix: 非公開の投稿に対して返信できないように
+- Fix: LTLに特定条件下にてチャンネルへの投稿が混ざり込む現象を修正
## 2023.11.0
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 003dae6614..79baa6b285 100644
--- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts
@@ -186,7 +186,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // 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/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) {