1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-27 14:28:10 +09:00

fix: push notification click (#643)

This commit is contained in:
Joaquín Sánchez 2022-12-29 23:43:23 +01:00 committed by GitHub
parent 861afe79b2
commit 9de4a14b32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,17 +19,7 @@ export const onPush = (event: PushEvent) => {
preferred_locale,
} = options
let url = 'home'
if (notification_type) {
switch (notification_type) {
case 'follow':
url = 'notifications'
break
case 'mention':
url = 'notifications/mention'
break
}
}
const url = notification_type === 'mention' ? 'notifications/mention' : 'notifications'
const notificationOptions: NotificationOptions = {
badge: '/pwa-192x192.png',