Fix notification permissions being requested immediately after login (#26472)
This commit is contained in:
parent
287520453c
commit
520b570474
2 changed files with 6 additions and 1 deletions
|
@ -33,7 +33,7 @@ function main() {
|
|||
console.error(err);
|
||||
}
|
||||
|
||||
if (registration) {
|
||||
if (registration && 'Notification' in window && Notification.permission === 'granted') {
|
||||
const registerPushNotifications = await import('mastodon/actions/push_notifications');
|
||||
|
||||
store.dispatch(registerPushNotifications.register());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue