send test push notifications to specific users only
This commit is contained in:
@ -114,7 +114,7 @@ const Notification = async (req, res) => {
|
||||
}
|
||||
else if (id) {
|
||||
console.log('Sending push notification to publisher ', id)
|
||||
await sendPush(id, title, message.actions)
|
||||
await sendPush(id, title, message, actions)
|
||||
res.statusCode = 200
|
||||
res.end()
|
||||
return
|
||||
|
@ -833,7 +833,20 @@ export default function CalendarPage({ initialEvents, initialShifts }) {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ broadcast: true, message: "Тестово съобщение", title: "Това е тестово съобщение от https://sofia.mwitnessing.com" })
|
||||
body: JSON.stringify({
|
||||
id: pub.id, message: "Тестово съобщение", title: "Това е тестово съобщение от https://sofia.mwitnessing.com", actions: [
|
||||
{
|
||||
action: 'open_url',
|
||||
title: 'Open URL',
|
||||
icon: '/images/open-url.png'
|
||||
},
|
||||
{
|
||||
action: 'dismiss',
|
||||
title: 'Dismiss',
|
||||
icon: '/images/dismiss.png'
|
||||
}
|
||||
]
|
||||
})
|
||||
})
|
||||
}}
|
||||
>+</button>
|
||||
|
@ -108,7 +108,7 @@ export default function DashboardPage({ initialItems, initialUserId, cartEvents,
|
||||
toast(content, {
|
||||
toastId,
|
||||
autoClose: false, // Keep the toast open until manually closed
|
||||
closeButton: true,
|
||||
closeButton: false,
|
||||
onClose: () => handleClose(toastId),
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user