Skip to content

Commit

Permalink
Fix notification permissions being requested immediately after login
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Aug 14, 2023
1 parent 496eb6f commit b01aa35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/main.jsx
Expand Up @@ -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());
Expand Down

0 comments on commit b01aa35

Please sign in to comment.