From 67e8d6a0cdebcbc1cf737f39377c79c27ef2cf41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 18 Aug 2022 20:05:08 +0200 Subject: [PATCH] Use account.acct in push notification URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/service_worker/web_push_notifications.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/service_worker/web_push_notifications.ts b/app/soapbox/service_worker/web_push_notifications.ts index eefeb2b1b..fe3d8e652 100644 --- a/app/soapbox/service_worker/web_push_notifications.ts +++ b/app/soapbox/service_worker/web_push_notifications.ts @@ -146,7 +146,7 @@ const handlePush = (event: PushEvent) => { timestamp: notification.created_at && Number(new Date(notification.created_at)), tag: notification.id, image: notification.status?.media_attachments[0]?.preview_url, - data: { access_token, preferred_locale, id: notification.status ? notification.status.id : notification.account.id, url: notification.status ? `/@${notification.account.username}/posts/${notification.status.id}` : `/@${notification.account.username}` }, + data: { access_token, preferred_locale, id: notification.status ? notification.status.id : notification.account.id, url: notification.status ? `/@${notification.account.acct}/posts/${notification.status.id}` : `/@${notification.account.acct}` }, }; if (notification.status?.spoiler_text || notification.status?.sensitive) {