Fix FORWARDEDTIP change lost in serviceworker (#582)

Co-authored-by: ekzyis <ek@stacker.news>
This commit is contained in:
ekzyis 2023-10-24 18:27:59 +02:00 committed by GitHub
parent 0c9131f698
commit eeaf2d5cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -51,9 +51,9 @@ const skipNotification = ({ options: { tag, data } }) => {
return tag === 'MENTION' && itemMentions.includes(data.itemId)
}
// if there is no tag or it's a TIP or EARN notification
// if there is no tag or it's a TIP, FORWARDEDTIP or EARN notification
// we don't need to merge notifications and thus the notification should be immediately shown using `showNotification`
const immediatelyShowNotification = ({ options: { tag } }) => !tag || ['TIP', 'EARN'].includes(tag.split('-')[0])
const immediatelyShowNotification = ({ options: { tag } }) => !tag || ['TIP', 'FORWARDEDTIP', 'EARN'].includes(tag.split('-')[0])
const mergeAndShowNotification = (sw, payload, currentNotification) => {
const { data: incomingData } = payload.options