Remove subscription / service worker check requirement
This commit is contained in:
1 parent
c57509ac7b
commit
b148cc3d1b
1 file changed
+2
-7
@@ -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);
|
||||
});
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
togglePusher(mx, clientConfig, document.visibilityState === 'visible');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user