diff --git a/app/js/tl/mix.js b/app/js/tl/mix.js index 20ff99f9..0be535db 100644 --- a/app/js/tl/mix.js +++ b/app/js/tl/mix.js @@ -27,12 +27,12 @@ async function mixtl(acct_id, tlid, type, delc, voice) { mixre(acct_id, tlid, 'mix', mute, voice, '') clearInterval(mbws) } else if(mastodonBaseWsStatus[domain] == 'available') { - mastodonBaseWs[domain].send(`{"type":"subscribe","stream":"public:local"}`) + mastodonBaseWs[domain].send(JSON.stringify({type: 'subscribe', stream: 'public:local'})) clearInterval(mbws) } }, 1000) } else if(mastodonBaseWsStatus[domain] == 'available') { - mastodonBaseWs[domain].send(`{"type":"subscribe","stream":"public:local"}`) + mastodonBaseWs[domain].send(JSON.stringify({type: 'subscribe', stream: 'public:local'})) } $(window).scrollTop(0) diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index 4692463c..b711dc71 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -1564,7 +1564,7 @@ function mastodonBaseStreaming(acct_id) { setTimeout(function () { mastodonBaseWsStatus[domain] = 'available' }, 3000) - mastodonBaseWs[domain].send(`{"type":"subscribe","stream":"user"}`) + mastodonBaseWs[domain].send(JSON.stringify({type: 'subscribe', stream: 'user'})) $('.notice_icon_acct_' + acct_id).removeClass('red-text') } mastodonBaseWs[domain].onmessage = function (mess) { diff --git a/app/js/tl/tl.js b/app/js/tl/tl.js index 1734db4c..ca133262 100644 --- a/app/js/tl/tl.js +++ b/app/js/tl/tl.js @@ -278,7 +278,7 @@ function stremaingSubscribe(type, acct_id, data, unsubscribe) { else if (type === 'pub') { stream = 'public' } else if (type === 'pub-media') { stream = 'public:media' } else if (type === 'list') { - mastodonBaseWs[domain].send(`{"type":"${command}","stream":"list","list":"${data}"}`) + mastodonBaseWs[domain].send(JSON.stringify({type: command, stream: 'list', list: data})) return true } else if (type === 'tag') { let arr = [] @@ -288,11 +288,11 @@ function stremaingSubscribe(type, acct_id, data, unsubscribe) { if (data.any) arr = arr.concat(data.any.split(',')) if (data.all) arr = arr.concat(data.all.split(',')) for (const tag of arr) { - mastodonBaseWs[domain].send(`{"type":"${command}","stream":"hashtag","tag":"${tag}"}`) + mastodonBaseWs[domain].send(JSON.stringify({type: command, stream: 'hashtag', tag: tag})) } return true } - mastodonBaseWs[domain].send(`{"type":"${command}","stream":"${stream}"`) + mastodonBaseWs[domain].send(JSON.stringify({type: command, stream: stream})) } function oldStreaming(type, cc, acct_id, tlid, data, mute, delc, voice, mode) { var misskey = false