summaryrefslogtreecommitdiff
path: root/src/server/api/streaming.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-11 23:01:57 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-11 23:01:57 +0900
commite85f9f4aa57023ab7c63b9b2f94dc15a910a46a9 (patch)
tree402a5c0b7deaa773c48abf15223b701a2d18971d /src/server/api/streaming.ts
parentResolve #543 (diff)
downloadsharkey-e85f9f4aa57023ab7c63b9b2f94dc15a910a46a9.tar.gz
sharkey-e85f9f4aa57023ab7c63b9b2f94dc15a910a46a9.tar.bz2
sharkey-e85f9f4aa57023ab7c63b9b2f94dc15a910a46a9.zip
共有可能チャンネルに接続しようとしていて、かつそのチャンネルに既に接続していたら無意味なので無視するように
Diffstat (limited to 'src/server/api/streaming.ts')
-rw-r--r--src/server/api/streaming.ts11
1 files changed, 5 insertions, 6 deletions
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');
}
}