From 30cc139fade2f432be7fab0b7006b2c2cf964d4c Mon Sep 17 00:00:00 2001 From: Effy Elden Date: Fri, 6 Jan 2017 08:26:45 +1100 Subject: [PATCH] Add tag property to desktop notifications, preventing duplicates (i.e. when multiple Mastodon tabs are open) --- app/assets/javascripts/components/actions/notifications.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/components/actions/notifications.jsx b/app/assets/javascripts/components/actions/notifications.jsx index 8bd8354063..182b598aa5 100644 --- a/app/assets/javascripts/components/actions/notifications.jsx +++ b/app/assets/javascripts/components/actions/notifications.jsx @@ -40,7 +40,7 @@ export function updateNotifications(notification, intlMessages, intlLocale) { const title = new IntlMessageFormat(intlMessages[`notification.${notification.type}`], intlLocale).format({ name: notification.account.display_name.length > 0 ? notification.account.display_name : notification.account.username }); const body = $('

').html(notification.status ? notification.status.content : '').text(); - new Notification(title, { body, icon: notification.account.avatar }); + new Notification(title, { body, icon: notification.account.avatar, tag: notification.id }); } }; };