summaryrefslogtreecommitdiff
path: root/src/server/api/streaming.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-17 14:52:28 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-17 14:52:28 +0900
commita0e640b1189a55c28aafe7d586d531731ad450a4 (patch)
treec8d0ed34511646f1b5a1e68ff24d7510b1c64e7b /src/server/api/streaming.ts
parentキューのメモリ使用量を削減 (diff)
downloadmisskey-a0e640b1189a55c28aafe7d586d531731ad450a4.tar.gz
misskey-a0e640b1189a55c28aafe7d586d531731ad450a4.tar.bz2
misskey-a0e640b1189a55c28aafe7d586d531731ad450a4.zip
ローカルタイムラインとグローバルタイムラインを実装
Diffstat (limited to 'src/server/api/streaming.ts')
-rw-r--r--src/server/api/streaming.ts6
1 files changed, 5 insertions, 1 deletions
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 :