]> cat aescling's git repositories - mastodon.git/commitdiff
Fix a bug where the hashtag could not be specified with the streaming API (#2258)
author178inaba <magic.brain.evolution.7.0@gmail.com>
Fri, 21 Apr 2017 14:45:14 +0000 (23:45 +0900)
committerEugen <eugen@zeonfederated.com>
Fri, 21 Apr 2017 14:45:14 +0000 (16:45 +0200)
streaming/index.js

index 5e25085c25f2080a2fcc47643afc3352a8614f08..8395c9cf8e77710b1031944df9d74969b336aacb 100644 (file)
@@ -285,11 +285,11 @@ if (cluster.isMaster) {
   })
 
   app.get('/api/v1/streaming/hashtag', (req, res) => {
-    streamFrom(`timeline:hashtag:${req.params.tag}`, req, streamToHttp(req, res), streamHttpEnd(req), true)
+    streamFrom(`timeline:hashtag:${req.query.tag}`, req, streamToHttp(req, res), streamHttpEnd(req), true)
   })
 
   app.get('/api/v1/streaming/hashtag/local', (req, res) => {
-    streamFrom(`timeline:hashtag:${req.params.tag}:local`, req, streamToHttp(req, res), streamHttpEnd(req), true)
+    streamFrom(`timeline:hashtag:${req.query.tag}:local`, req, streamToHttp(req, res), streamHttpEnd(req), true)
   })
 
   wss.on('connection', ws => {