From 4d3ef5dd2addcffbdeaf6502f46f8c11ab65bd78 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Wed, 22 Oct 2025 03:43:56 +0200 Subject: [PATCH] Log payload --- backend/api/src/junk-drawer/private-messages.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/api/src/junk-drawer/private-messages.ts b/backend/api/src/junk-drawer/private-messages.ts index 9cad575c..c7a5f03b 100644 --- a/backend/api/src/junk-drawer/private-messages.ts +++ b/backend/api/src/junk-drawer/private-messages.ts @@ -173,12 +173,13 @@ const notifyOtherUserInChannelIfInactive = async ( const subscriptions = await getSubscriptionsFromDB(otherUser.id, pg); for (const subscription of subscriptions) { try { - console.log('Sending notification to:', subscription.endpoint); - await webPush.sendNotification(subscription, JSON.stringify({ + const payload = JSON.stringify({ title: `${creator.name}`, body: textContent, url: `/messages/${channelId}`, - })); + }) + console.log('Sending notification to:', subscription.endpoint, payload); + await webPush.sendNotification(subscription, payload); } catch (err) { console.error('Failed to send notification', err); // optionally remove invalid subscription from DB