about summary refs log tree commit diff
path: root/streaming/index.js
diff options
context:
space:
mode:
authorSurinna Curtis <ekiru.0@gmail.com>2017-11-16 01:21:16 -0600
committerSurinna Curtis <ekiru.0@gmail.com>2017-11-16 01:21:16 -0600
commit35fbdc36f92b610e8a73e2acb220e87cf5fc83b0 (patch)
treefcd9bdb5ba49ab7a6a79590c74db858ae77b4239 /streaming/index.js
parent30237259367a0ef2b20908518b86bbeb358999b5 (diff)
parent88627fd7aa2493a6890d60a5965459e4c7fe6fe9 (diff)
Merge tootsuite/master at 30237259367a0ef2b20908518b86bbeb358999b5
Diffstat (limited to 'streaming/index.js')
-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;