Fix TypeError during push notifications (#448)
Without this, following error is thrown when notifying users about new replies: [webPush] error sending user notification: TypeError: Cannot read properties of undefined (reading 'id') app | at createItemUrl (webpack-internal:///(api)/./api/webPush/index.js:76:29) app | at async sendUserNotification (webpack-internal:///(api)/./api/webPush/index.js:125:33) app | at async Promise.allSettled (index 0) Co-authored-by: ekzyis <ek@stacker.news>
This commit is contained in:
parent
ded3bd680f
commit
4a0e615d7d
|
@ -684,7 +684,7 @@ export default {
|
||||||
parents.map(({ userId }) => sendUserNotification(userId, {
|
parents.map(({ userId }) => sendUserNotification(userId, {
|
||||||
title: `@${user.name} replied to you`,
|
title: `@${user.name} replied to you`,
|
||||||
body: item.text,
|
body: item.text,
|
||||||
item,
|
item: rItem,
|
||||||
tag: 'REPLY'
|
tag: 'REPLY'
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue