diff options
author | Matthew Walsh <mattwcstrfan@gmail.com> | 2017-10-15 21:02:39 -0700 |
---|---|---|
committer | Matthew Walsh <mattwcstrfan@gmail.com> | 2017-10-22 18:35:14 -0700 |
commit | 3db80f75a6d76a7eea576413c5ae9b206d2ab385 (patch) | |
tree | 0b6f4a0f446c94fbbda1484b6f14537181d00a1a /streaming | |
parent | 09d81defcda96eae7ffba36ccf1fb091ce08f17b (diff) |
Added a timeline for Direct statuses
* Lists all Direct statuses you've sent and received * Displayed in Getting Started * Streaming server support for direct TL
Diffstat (limited to 'streaming')
-rw-r--r-- | streaming/index.js | 7 |
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; |