diff options
Diffstat (limited to 'src/server/api/streaming.ts')
| -rw-r--r-- | src/server/api/streaming.ts | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/server/api/streaming.ts b/src/server/api/streaming.ts index f8f3c0ff4a..ab66f2b6d9 100644 --- a/src/server/api/streaming.ts +++ b/src/server/api/streaming.ts @@ -48,33 +48,6 @@ module.exports = (server: http.Server) => { const main = new MainStreamConnection(connection, ev, user, app); - // 後方互換性のため - if (request.resourceURL.pathname !== '/streaming') { - main.sendMessageToWsOverride = (type: string, payload: any) => { - if (type == 'channel') { - type = payload.type; - payload = payload.body; - } - if (type.startsWith('api:')) { - type = type.replace('api:', 'api-res:'); - } - connection.send(JSON.stringify({ - type: type, - body: payload - })); - }; - - main.connectChannel(Math.random().toString().substr(2, 8), 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().substr(2, 8), null, 'main'); - } - } - connection.once('close', () => { ev.removeAllListeners(); main.dispose(); |