Update new recommendation notification message

This commit is contained in:
Hongbo Wu
2022-12-09 10:56:08 +08:00
parent e85ec51e6c
commit 181b401030
2 changed files with 9 additions and 3 deletions

View File

@ -221,7 +221,14 @@ export const createLabelAndRuleForGroup = async (
},
{
type: RuleActionType.SendNotification,
params: [groupName],
params: [
`
{
"title": "New page recommended in ${groupName}",
"body": "A new page was added to the group ${groupName}"
}
`,
],
},
],
filter: `recommendedBy:"${groupName}"`,

View File

@ -134,8 +134,7 @@ export const triggerActions = async (
const param = JSON.parse(params[0]) as NotificationData
data.body = param.body
data.title = param.title
data.image = param.image
data.data = param.data
data.image = param.image || data.image
}
return actionPromises.push(