From a0e640b1189a55c28aafe7d586d531731ad450a4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 17 Apr 2018 14:52:28 +0900 Subject: ローカルタイムラインとグローバルタイムラインを実装 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/streaming.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/server/api/streaming.ts') diff --git a/src/server/api/streaming.ts b/src/server/api/streaming.ts index d586d7c08f..ce13253649 100644 --- a/src/server/api/streaming.ts +++ b/src/server/api/streaming.ts @@ -4,6 +4,8 @@ import * as redis from 'redis'; import config from '../../config'; import homeStream from './stream/home'; +import localTimelineStream from './stream/local-timeline'; +import globalTimelineStream from './stream/global-timeline'; import driveStream from './stream/drive'; import messagingStream from './stream/messaging'; import messagingIndexStream from './stream/messaging-index'; @@ -64,8 +66,10 @@ module.exports = (server: http.Server) => { return; } - const channel = + const channel: any = request.resourceURL.pathname === '/' ? homeStream : + request.resourceURL.pathname === '/local-timeline' ? localTimelineStream : + request.resourceURL.pathname === '/global-timeline' ? globalTimelineStream : request.resourceURL.pathname === '/drive' ? driveStream : request.resourceURL.pathname === '/messaging' ? messagingStream : request.resourceURL.pathname === '/messaging-index' ? messagingIndexStream : -- cgit v1.2.3-freya