diff --git a/src/main/index.js b/src/main/index.js index a6979cfd..3efca3cd 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -585,22 +585,23 @@ ipcMain.on('stop-list-streaming', (event, _) => { let tagStreaming = null ipcMain.on('start-tag-streaming', (event, obj) => { - accountManager.getAccount(obj.account._id) + const { tag, account, useWebsocket } = obj + accountManager.getAccount(account._id) .catch((err) => { log.error(err) event.sender.send('error-start-tag-streaming', err) }) - .then((account) => { + .then((acct) => { // Stop old tag streaming if (tagStreaming !== null) { tagStreaming.stop() tagStreaming = null } - tagStreaming = new StreamingManager(account) + tagStreaming = new StreamingManager(acct, useWebsocket) tagStreaming.start( 'hashtag', - `tag=${obj.tag}`, + `tag=${tag}`, (update) => { event.sender.send('update-start-tag-streaming', update) }, diff --git a/src/renderer/store/TimelineSpace/Contents/Hashtag/Tag.js b/src/renderer/store/TimelineSpace/Contents/Hashtag/Tag.js index e0d828c9..e6122c7e 100644 --- a/src/renderer/store/TimelineSpace/Contents/Hashtag/Tag.js +++ b/src/renderer/store/TimelineSpace/Contents/Hashtag/Tag.js @@ -91,7 +91,8 @@ const Tag = { return new Promise((resolve, reject) => { ipcRenderer.send('start-tag-streaming', { tag: encodeURIComponent(tag), - account: rootState.TimelineSpace.account + account: rootState.TimelineSpace.account, + useWebsocket: rootState.TimelineSpace.useWebsocket }) ipcRenderer.once('error-start-tag-streaming', (event, err) => { reject(err)