summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream/channels
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-08-02 13:05:53 +0100
committerdakkar <dakkar@thenautilus.net>2024-08-02 13:05:53 +0100
commit98c7b95ecc4ad420d6335a92c8892a9ae280e97c (patch)
tree291cd4d08a9b2200d15aae8b63d2382e1fbd4ca3 /packages/backend/src/server/api/stream/channels
parentcopy from MkNoteDetailed to SkNoteDetailed (diff)
downloadsharkey-98c7b95ecc4ad420d6335a92c8892a9ae280e97c.tar.gz
sharkey-98c7b95ecc4ad420d6335a92c8892a9ae280e97c.tar.bz2
sharkey-98c7b95ecc4ad420d6335a92c8892a9ae280e97c.zip
copy from global-timeline to bubble-timeline
Diffstat (limited to 'packages/backend/src/server/api/stream/channels')
-rw-r--r--packages/backend/src/server/api/stream/channels/bubble-timeline.ts9
1 files changed, 5 insertions, 4 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 01be2d2089..647e9cab81 100644
--- a/packages/backend/src/server/api/stream/channels/bubble-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/bubble-timeline.ts
@@ -11,6 +11,7 @@ import { bindThis } from '@/decorators.js';
import { RoleService } from '@/core/RoleService.js';
import type { MiMeta } from '@/models/Meta.js';
import { isRenotePacked, isQuotePacked } from '@/misc/is-renote.js';
+import type { JsonObject } from '@/misc/json-value.js';
import Channel, { MiChannelService } from '../channel.js';
class BubbleTimelineChannel extends Channel {
@@ -35,13 +36,13 @@ class BubbleTimelineChannel extends Channel {
}
@bindThis
- public async init(params: any) {
+ public async init(params: JsonObject) {
const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null);
if (!policies.btlAvailable) return;
- this.withRenotes = params.withRenotes ?? true;
- this.withFiles = params.withFiles ?? false;
- this.withBots = params.withBots ?? true;
+ this.withRenotes = !!(params.withRenotes ?? true);
+ this.withFiles = !!(params.withFiles ?? false);
+ this.withBots = !!(params.withBots ?? true);
this.instance = await this.metaService.fetch();
// Subscribe events