summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream/channels/bubble-timeline.ts
diff options
context:
space:
mode:
authorMarie <marie@kaifa.ch>2024-01-26 01:59:19 +0100
committerMarie <marie@kaifa.ch>2024-01-26 01:59:19 +0100
commite5c060eecf3be33c26f4909a933d1884fda4eee3 (patch)
tree2adb61d6693b2cf4e608c31863348987ca981875 /packages/backend/src/server/api/stream/channels/bubble-timeline.ts
parentfix: allow viewing of muted users posts (diff)
downloadsharkey-e5c060eecf3be33c26f4909a933d1884fda4eee3.tar.gz
sharkey-e5c060eecf3be33c26f4909a933d1884fda4eee3.tar.bz2
sharkey-e5c060eecf3be33c26f4909a933d1884fda4eee3.zip
fix: don't show mentions and boosts towards muted user posts in timeline
Closes #336
Diffstat (limited to 'packages/backend/src/server/api/stream/channels/bubble-timeline.ts')
-rw-r--r--packages/backend/src/server/api/stream/channels/bubble-timeline.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/backend/src/server/api/stream/channels/bubble-timeline.ts b/packages/backend/src/server/api/stream/channels/bubble-timeline.ts
index 4f8809edbe..2d85d65ba5 100644
--- a/packages/backend/src/server/api/stream/channels/bubble-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/bubble-timeline.ts
@@ -78,6 +78,9 @@ class BubbleTimelineChannel extends Channel {
// 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する
if (isUserRelated(note, this.userIdsWhoBlockingMe)) return;
+ if (note.renote && !note.text && note.renote.mentions?.some(mention => this.userIdsWhoMeMuting.has(mention))) return;
+ if (note.mentions?.some(mention => this.userIdsWhoMeMuting.has(mention))) return;
+
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (this.user && note.renoteId && !note.text) {