forked from treehouse/mastodon
Fix streaming url to lowercase (#4804)
parent
09cffaaf04
commit
b6f3869f8d
|
@ -403,11 +403,11 @@ const startWorker = (workerId) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/api/v1/streaming/hashtag', (req, res) => {
|
app.get('/api/v1/streaming/hashtag', (req, res) => {
|
||||||
streamFrom(`timeline:hashtag:${req.query.tag}`, req, streamToHttp(req, res), streamHttpEnd(req), true);
|
streamFrom(`timeline:hashtag:${req.query.tag.toLowerCase()}`, req, streamToHttp(req, res), streamHttpEnd(req), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/api/v1/streaming/hashtag/local', (req, res) => {
|
app.get('/api/v1/streaming/hashtag/local', (req, res) => {
|
||||||
streamFrom(`timeline:hashtag:${req.query.tag}:local`, req, streamToHttp(req, res), streamHttpEnd(req), true);
|
streamFrom(`timeline:hashtag:${req.query.tag.toLowerCase()}:local`, req, streamToHttp(req, res), streamHttpEnd(req), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
const wss = new WebSocket.Server({ server, verifyClient: wsVerifyClient });
|
const wss = new WebSocket.Server({ server, verifyClient: wsVerifyClient });
|
||||||
|
@ -438,10 +438,10 @@ const startWorker = (workerId) => {
|
||||||
streamFrom('timeline:public:local', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
|
streamFrom('timeline:public:local', req, streamToWs(req, ws), streamWsEnd(req, ws), true);
|
||||||
break;
|
break;
|
||||||
case 'hashtag':
|
case 'hashtag':
|
||||||
streamFrom(`timeline:hashtag:${location.query.tag}`, req, streamToWs(req, ws), streamWsEnd(req, ws), true);
|
streamFrom(`timeline:hashtag:${location.query.tag.toLowerCase()}`, req, streamToWs(req, ws), streamWsEnd(req, ws), true);
|
||||||
break;
|
break;
|
||||||
case 'hashtag:local':
|
case 'hashtag:local':
|
||||||
streamFrom(`timeline:hashtag:${location.query.tag}:local`, req, streamToWs(req, ws), streamWsEnd(req, ws), true);
|
streamFrom(`timeline:hashtag:${location.query.tag.toLowerCase()}:local`, req, streamToWs(req, ws), streamWsEnd(req, ws), true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ws.close();
|
ws.close();
|
||||||
|
|
Loading…
Reference in New Issue