mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-05 23:10:28 +03:00
Remove subscription / service worker check requirement
This commit is contained in:
parent
c57509ac7b
commit
b148cc3d1b
1 changed files with 2 additions and 7 deletions
|
|
@ -127,13 +127,8 @@ function ClientRootOptions({ mx }: { mx?: MatrixClient }) {
|
|||
}
|
||||
|
||||
const pushNotificationListener = (mx: MatrixClient, clientConfig: ClientConfig) => {
|
||||
navigator.serviceWorker.ready.then((registration) => {
|
||||
registration.pushManager.getSubscription().then((subscription) => {
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
togglePusher(mx, subscription, clientConfig, document.visibilityState === 'visible');
|
||||
});
|
||||
togglePusher(mx, subscription, true);
|
||||
});
|
||||
togglePusher(mx, clientConfig, document.visibilityState === 'visible');
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue