about summary refs log tree commit diff
path: root/app/javascript/mastodon/service_worker/web_push_notifications.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2021-09-26 05:46:13 +0200
committerGitHub <noreply@github.com>2021-09-26 05:46:13 +0200
commit52e5c07948c4c91b73062846e1f19ea278ec0e24 (patch)
treeb46b76f919f51ad5a5ac288be2ad2565fa859496 /app/javascript/mastodon/service_worker/web_push_notifications.js
parent9c9290768190d412e5b3d65502ee5d0d30596412 (diff)
Change routing paths to use usernames in web UI (#16171)
Diffstat (limited to 'app/javascript/mastodon/service_worker/web_push_notifications.js')
-rw-r--r--app/javascript/mastodon/service_worker/web_push_notifications.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/service_worker/web_push_notifications.js b/app/javascript/mastodon/service_worker/web_push_notifications.js
index 958e5fc12..926c5c4d7 100644
--- a/app/javascript/mastodon/service_worker/web_push_notifications.js
+++ b/app/javascript/mastodon/service_worker/web_push_notifications.js
@@ -90,7 +90,7 @@ const handlePush = (event) => {
       options.tag       = notification.id;
       options.badge     = '/badge.png';
       options.image     = notification.status && notification.status.media_attachments.length > 0 && notification.status.media_attachments[0].preview_url || undefined;
-      options.data      = { access_token, preferred_locale, id: notification.status ? notification.status.id : notification.account.id, url: notification.status ? `/web/statuses/${notification.status.id}` : `/web/accounts/${notification.account.id}` };
+      options.data      = { access_token, preferred_locale, id: notification.status ? notification.status.id : notification.account.id, url: notification.status ? `/web/@${notification.account.acct}/${notification.status.id}` : `/web/@${notification.account.acct}` };
 
       if (notification.status && notification.status.spoiler_text || notification.status.sensitive) {
         options.data.hiddenBody  = htmlToPlainText(notification.status.content);