summaryrefslogtreecommitdiff
path: root/src/server/api/stream/index.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-11 02:22:34 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-11 02:22:34 +0900
commit6012e98ae6232146b91d8dc2f140282f660e66f0 (patch)
treebba16d85985970e5e6cf8c23e49a815860843935 /src/server/api/stream/index.ts
parentBetter chart generation (diff)
downloadsharkey-6012e98ae6232146b91d8dc2f140282f660e66f0.tar.gz
sharkey-6012e98ae6232146b91d8dc2f140282f660e66f0.tar.bz2
sharkey-6012e98ae6232146b91d8dc2f140282f660e66f0.zip
Improve streaming API
Diffstat (limited to 'src/server/api/stream/index.ts')
-rw-r--r--src/server/api/stream/index.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts
index 96a4c7add6..58dbacd688 100644
--- a/src/server/api/stream/index.ts
+++ b/src/server/api/stream/index.ts
@@ -173,6 +173,10 @@ export default class Connection {
*/
@autobind
public connectChannel(id: string, params: any, channel: string, pong = false) {
+ if ((channels as any)[channel].requireCredential && this.user == null) {
+ return;
+ }
+
// 共有可能チャンネルに接続しようとしていて、かつそのチャンネルに既に接続していたら無意味なので無視
if ((channels as any)[channel].shouldShare && this.channels.some(c => c.chName === channel)) {
return;