diff --git a/templates/service-worker.js b/templates/service-worker.js index efced8b..928476e 100644 --- a/templates/service-worker.js +++ b/templates/service-worker.js @@ -138,9 +138,6 @@ async function showRichNotification (data, notification) { const actions = [{ action: 'favourite', title: 'Favourite' - }, { - action: 'reblog', - title: 'Boost' }] if ('reply' in NotificationEvent.prototype) { @@ -151,6 +148,13 @@ async function showRichNotification (data, notification) { }) } + if (['public', 'unlisted'].includes(notification.status.visibility)) { + actions.push({ + action: 'reblog', + title: 'Boost' + }) + } + await self.registration.showNotification(data.title, { icon: data.icon, body: data.body,