summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream/channels/global-timeline.ts
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-10-18 13:34:16 +0200
committerMar0xy <marie@kaifa.ch>2023-10-18 13:34:16 +0200
commita4a1b8bb8b9db72e7be45bf44fd19b36fa8e81f4 (patch)
tree8ad917254da2ffa51d9e58c8dd50dbb974a2ce6a /packages/backend/src/server/api/stream/channels/global-timeline.ts
parentfix: default for bottrending in model (diff)
downloadsharkey-a4a1b8bb8b9db72e7be45bf44fd19b36fa8e81f4.tar.gz
sharkey-a4a1b8bb8b9db72e7be45bf44fd19b36fa8e81f4.tar.bz2
sharkey-a4a1b8bb8b9db72e7be45bf44fd19b36fa8e81f4.zip
add: isSilenced handling to user and timeline
Diffstat (limited to 'packages/backend/src/server/api/stream/channels/global-timeline.ts')
-rw-r--r--packages/backend/src/server/api/stream/channels/global-timeline.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/backend/src/server/api/stream/channels/global-timeline.ts b/packages/backend/src/server/api/stream/channels/global-timeline.ts
index 58e53fdd8c..b39afbe361 100644
--- a/packages/backend/src/server/api/stream/channels/global-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts
@@ -62,6 +62,8 @@ class GlobalTimelineChannel extends Channel {
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
}
+ if (note.user.isSilenced && !this.following[note.userId] && note.userId !== this.user!.id) return;
+
if (note.renote && note.text == null && (note.fileIds == null || note.fileIds.length === 0) && !this.withRenotes) return;
// Ignore notes from instances the user has muted