diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-08 00:58:10 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-08 00:58:10 +0900 |
| commit | 305915611e98094eea832d0441f1d0990096f8ab (patch) | |
| tree | 7b1089c60c41e6ebf6b9e77fdde68f8ecfe89c76 /src/server/api/streaming.ts | |
| parent | fix(package): update @types/debug to version 0.0.31 (#2822) (diff) | |
| download | misskey-305915611e98094eea832d0441f1d0990096f8ab.tar.gz misskey-305915611e98094eea832d0441f1d0990096f8ab.tar.bz2 misskey-305915611e98094eea832d0441f1d0990096f8ab.zip | |
Fix bug
Diffstat (limited to 'src/server/api/streaming.ts')
| -rw-r--r-- | src/server/api/streaming.ts | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/server/api/streaming.ts b/src/server/api/streaming.ts index b7793eb284..8bfa5574f1 100644 --- a/src/server/api/streaming.ts +++ b/src/server/api/streaming.ts @@ -25,7 +25,7 @@ module.exports = (server: http.Server) => { // 後方互換性のため if (request.resourceURL.pathname !== '/streaming') { - main.sendMessageToWs = (type: string, payload: any) => { + main.sendMessageToWsOverride = (type: string, payload: any) => { if (type == 'channel') { type = payload.type; payload = payload.body; @@ -35,13 +35,12 @@ module.exports = (server: http.Server) => { body: payload })); }; - if (request.resourceURL.pathname === '/') { - 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); - } + + 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); } connection.once('close', () => { |