vary push notification body for subscriptions based on whether item is post (#476)
This commit is contained in:
parent
e6ffeb8f76
commit
ec758b2d5f
@ -1204,7 +1204,7 @@ export const createItem = async (parent, { forward, options, ...item }, { me, mo
|
|||||||
const isPost = !!item.title
|
const isPost = !!item.title
|
||||||
await Promise.allSettled(userSubs.map(({ followerId, followee }) => sendUserNotification(followerId, {
|
await Promise.allSettled(userSubs.map(({ followerId, followee }) => sendUserNotification(followerId, {
|
||||||
title: `@${followee.name} ${isPost ? 'created a post' : 'replied to a post'}`,
|
title: `@${followee.name} ${isPost ? 'created a post' : 'replied to a post'}`,
|
||||||
body: item.text,
|
body: isPost ? item.title : item.text,
|
||||||
item,
|
item,
|
||||||
tag: 'FOLLOW'
|
tag: 'FOLLOW'
|
||||||
})))
|
})))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user