From e85f9f4aa57023ab7c63b9b2f94dc15a910a46a9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 11 Oct 2018 23:01:57 +0900 Subject: 共有可能チャンネルに接続しようとしていて、かつそのチャンネルに既に接続していたら無意味なので無視するように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/streaming.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/server/api/streaming.ts') diff --git a/src/server/api/streaming.ts b/src/server/api/streaming.ts index 5710257d39..1a0543b364 100644 --- a/src/server/api/streaming.ts +++ b/src/server/api/streaming.ts @@ -6,7 +6,6 @@ import Xev from 'xev'; import MainStreamConnection from './stream'; import { ParsedUrlQuery } from 'querystring'; import authenticate from './authenticate'; -import channels from './stream/channels'; import { EventEmitter } from 'events'; import config from '../../config'; @@ -66,13 +65,13 @@ module.exports = (server: http.Server) => { }; main.connectChannel(Math.random().toString(), null, - request.resourceURL.pathname === '/' ? channels.homeTimeline : - request.resourceURL.pathname === '/local-timeline' ? channels.localTimeline : - request.resourceURL.pathname === '/hybrid-timeline' ? channels.hybridTimeline : - request.resourceURL.pathname === '/global-timeline' ? channels.globalTimeline : null); + request.resourceURL.pathname === '/' ? 'homeTimeline' : + request.resourceURL.pathname === '/local-timeline' ? 'localTimeline' : + request.resourceURL.pathname === '/hybrid-timeline' ? 'hybridTimeline' : + request.resourceURL.pathname === '/global-timeline' ? 'globalTimeline' : null); if (request.resourceURL.pathname === '/') { - main.connectChannel(Math.random().toString(), null, channels.main); + main.connectChannel(Math.random().toString(), null, 'main'); } } -- cgit v1.2.3-freya