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 2257be2b..f2aca7e3 100644 --- a/packages/backend/src/server/api/stream/channels/global-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts @@ -23,7 +23,7 @@ export default class extends Channel { return; } - this.withReplies = params.withReplies as boolean; + this.withReplies = params != null ? !!params.withReplies : true; // Subscribe events this.subscriber.on("notesStream", this.onNote); diff --git a/packages/backend/src/server/api/stream/channels/home-timeline.ts b/packages/backend/src/server/api/stream/channels/home-timeline.ts index 47875aed..52e2dc2a 100644 --- a/packages/backend/src/server/api/stream/channels/home-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/home-timeline.ts @@ -16,7 +16,7 @@ export default class extends Channel { } public async init(params: any) { - this.withReplies = params.withReplies as boolean; + this.withReplies = params != null ? !!params.withReplies : true; // Subscribe events this.subscriber.on("notesStream", this.onNote); diff --git a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts index 1f1a9b83..6e2da514 100644 --- a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts @@ -25,7 +25,7 @@ export default class extends Channel { ) return; - this.withReplies = params.withReplies as boolean; + this.withReplies = params != null ? !!params.withReplies : true; // Subscribe events this.subscriber.on("notesStream", this.onNote); 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 bd488bdd..2cc286b1 100644 --- a/packages/backend/src/server/api/stream/channels/local-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts @@ -22,7 +22,7 @@ export default class extends Channel { return; } - this.withReplies = params.withReplies as boolean; + this.withReplies = params != null ? !!params.withReplies : true; // Subscribe events this.subscriber.on("notesStream", this.onNote); diff --git a/packages/backend/src/server/api/stream/channels/recommended-timeline.ts b/packages/backend/src/server/api/stream/channels/recommended-timeline.ts index 0b78d8b6..186b1203 100644 --- a/packages/backend/src/server/api/stream/channels/recommended-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/recommended-timeline.ts @@ -25,7 +25,7 @@ export default class extends Channel { ) return; - this.withReplies = params.withReplies as boolean; + this.withReplies = params != null ? !!params.withReplies : true; // Subscribe events this.subscriber.on("notesStream", this.onNote);