about summary refs log tree commit diff
path: root/streaming
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-10-25 16:01:20 -0500
committerDavid Yip <yipdw@member.fsf.org>2017-10-25 16:01:20 -0500
commit42f2045c217df4b482e6ce70615a1d3252e0e972 (patch)
tree19e002405d30a50aca740a979efeb6b3a9d1e186 /streaming
parent5f0268ab842990740d79d44e77159bb52f1a08ce (diff)
parenta76b02422847c5d5996c03284f3dd5e662bbfb9d (diff)
Merge remote-tracking branch 'STJrInuyasha/feature/direct-timeline' into gs-direct-timeline
Diffstat (limited to 'streaming')
-rw-r--r--streaming/index.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/streaming/index.js b/streaming/index.js
index 83903b89b..8adc5174a 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -402,6 +402,10 @@ const startWorker = (workerId) => {
     streamFrom('timeline:public:local', req, streamToHttp(req, res), streamHttpEnd(req), true);
   });
 
+  app.get('/api/v1/streaming/direct', (req, res) => {
+    streamFrom(`timeline:direct:${req.accountId}`, req, streamToHttp(req, res), streamHttpEnd(req), true);
+  });
+
   app.get('/api/v1/streaming/hashtag', (req, res) => {
     streamFrom(`timeline:hashtag:${req.query.tag.toLowerCase()}`, req, streamToHttp(req, res), streamHttpEnd(req), true);
   });
@@ -437,6 +441,9 @@ const startWorker = (workerId) => {
     case 'public:local':
       streamFrom('timeline:public:local', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
       break;
+    case 'direct':
+      streamFrom(`timeline:direct:${req.accountId}`, req, streamToWs(req, ws), streamWsEnd(req, ws), true);
+      break;
     case 'hashtag':
       streamFrom(`timeline:hashtag:${location.query.tag.toLowerCase()}`, req, streamToWs(req, ws), streamWsEnd(req, ws), true);
       break;