diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-08-02 12:25:58 +0100 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-08-02 12:25:58 +0100 |
| commit | cfa9b852df9e0293865b3acbd67d59265962e552 (patch) | |
| tree | a408ad670956a45c4e162e4ecc97a3624e2b0f20 /packages/backend/src/server/api/stream/channels/channel.ts | |
| parent | merge: rate limit all password checks - fixes #540 (!568) (diff) | |
| parent | Merge pull request #14233 from misskey-dev/develop (diff) | |
| download | sharkey-cfa9b852df9e0293865b3acbd67d59265962e552.tar.gz sharkey-cfa9b852df9e0293865b3acbd67d59265962e552.tar.bz2 sharkey-cfa9b852df9e0293865b3acbd67d59265962e552.zip | |
Merge remote-tracking branch 'misskey/master' into feature/misskey-2024.07
Diffstat (limited to 'packages/backend/src/server/api/stream/channels/channel.ts')
| -rw-r--r-- | packages/backend/src/server/api/stream/channels/channel.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/backend/src/server/api/stream/channels/channel.ts b/packages/backend/src/server/api/stream/channels/channel.ts index 865e4fed19..226e161122 100644 --- a/packages/backend/src/server/api/stream/channels/channel.ts +++ b/packages/backend/src/server/api/stream/channels/channel.ts @@ -8,6 +8,7 @@ import type { Packed } from '@/misc/json-schema.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { bindThis } from '@/decorators.js'; import { isRenotePacked, isQuotePacked } from '@/misc/is-renote.js'; +import type { JsonObject } from '@/misc/json-value.js'; import Channel, { type MiChannelService } from '../channel.js'; class ChannelChannel extends Channel { @@ -30,9 +31,10 @@ class ChannelChannel extends Channel { @bindThis public async init(params: any) { - this.channelId = params.channelId as string; - this.withFiles = params.withFiles ?? false; - this.withRenotes = params.withRenotes ?? true; + if (typeof params.channelId !== 'string') return; + this.channelId = params.channelId; + this.withFiles = !!(params.withFiles ?? false); + this.withRenotes = !!(params.withRenotes ?? true); // Subscribe stream this.subscriber.on('notesStream', this.onNote); |