vary push notification body for subscriptions based on whether item is post (#476)

This commit is contained in:
SatsAllDay 2023-09-11 15:56:50 -04:00 committed by GitHub
parent e6ffeb8f76
commit ec758b2d5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1204,7 +1204,7 @@ export const createItem = async (parent, { forward, options, ...item }, { me, mo
const isPost = !!item.title
await Promise.allSettled(userSubs.map(({ followerId, followee }) => sendUserNotification(followerId, {
title: `@${followee.name} ${isPost ? 'created a post' : 'replied to a post'}`,
body: item.text,
body: isPost ? item.title : item.text,
item,
tag: 'FOLLOW'
})))