From 13f381710c72d485915c34100a71cba6b057e828 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 20 Oct 2018 09:31:52 +0900 Subject: [PATCH] Validate param --- src/server/api/stream/channels/hashtag.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/api/stream/channels/hashtag.ts b/src/server/api/stream/channels/hashtag.ts index cf652c166c..1f99aa3539 100644 --- a/src/server/api/stream/channels/hashtag.ts +++ b/src/server/api/stream/channels/hashtag.ts @@ -15,6 +15,8 @@ export default class extends Channel { const q: Array = params.q; + if (q == null) return; + // Subscribe stream this.subscriber.on('hashtag', async note => { const matched = q.some(tags => tags.every(tag => note.tags.map((t: string) => t.toLowerCase()).includes(tag.toLowerCase())));