From: Effy Elden Date: Thu, 5 Jan 2017 21:26:45 +0000 (+1100) Subject: Add tag property to desktop notifications, preventing duplicates (i.e. when multiple... X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=10a9ebae3b2fc0addb4604798a62d6c4e066d491;p=mastodon.git Add tag property to desktop notifications, preventing duplicates (i.e. when multiple Mastodon tabs are open) --- diff --git a/app/assets/javascripts/components/actions/notifications.jsx b/app/assets/javascripts/components/actions/notifications.jsx index 8bd835406..182b598aa 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 }); } }; };