Skip to content
Snippets Groups Projects
Commit 981e6f99 authored by syuilo's avatar syuilo
Browse files

fix(frontend): タブがアクティブな間はstreamが切断されないように

Fix #10952
parent 8263cc00
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,9 @@
## 13.13.1 (unreleased)
### Client
- Fix: タブがアクティブな間はstreamが切断されないように
### Server
- Fix: api/metaで`TypeError: JSON5.parse is not a function`エラーが発生する問題を修正
......
......@@ -12,5 +12,14 @@ export function useStream(): Misskey.Stream {
token: $i.token,
} : null));
window.setTimeout(heartbeat, 1000 * 60);
return stream;
}
function heartbeat(): void {
if (stream != null && document.visibilityState === 'visible') {
stream.send('ping');
}
window.setTimeout(heartbeat, 1000 * 60);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment