From 57eafa95ba51bca6a650d2ed796112554d79c86e Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Wed, 22 Oct 2025 15:00:41 +0200 Subject: [PATCH] Fire and forget other user notif --- backend/api/src/junk-drawer/private-messages.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/api/src/junk-drawer/private-messages.ts b/backend/api/src/junk-drawer/private-messages.ts index 7ad5cac3..e6b190bc 100644 --- a/backend/api/src/junk-drawer/private-messages.ts +++ b/backend/api/src/junk-drawer/private-messages.ts @@ -104,7 +104,6 @@ export const createPrivateUserMessageMain = async ( if (!authorized) throw new APIError(403, 'You are not authorized to post to this channel') - await notifyOtherUserInChannelIfInactive(channelId, creator, content, pg) await insertPrivateMessage(content, channelId, creator.id, visibility, pg) const privateMessage = { @@ -127,6 +126,12 @@ export const createPrivateUserMessageMain = async ( broadcast(`private-user-messages/${otherUserId}`, {}) }) + // Fire and forget safely + void notifyOtherUserInChannelIfInactive(channelId, creator, content, pg) + .catch((err) => { + console.error('notifyOtherUserInChannelIfInactive failed', err) + }); + track(creator.id, 'send private message', { channelId, otherUserIds,