fix: Show boost action only for toots with relevant visibility (#584)
This commit is contained in:
parent
bf0eb99fe4
commit
c1917318ca
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue