From 6ad1b7974a31b77923fae1c63685314d9d10c1f3 Mon Sep 17 00:00:00 2001 From: dhaval-patel262 <60753587+dhaval-patel262@users.noreply.github.com> Date: Wed, 2 Sep 2026 15:55:33 +0530 Subject: [PATCH] fix(notification): pass matched types to common inbox notifications getCommonNotificationTxes() passed a hardcoded empty array as the `types` argument to pushInboxNotifications(), so every notification created through it was stored with `types: []`. NotificationsHandler resolves the allowed providers per notification type. With no types it matches no provider, logs "no notifications with email provider, skipping" and returns, so these notifications can never be delivered by email or any non-inbox provider. This affects everything routed through this helper - ToDos, process approvals (process:ids:ApproveRequestCreated), HR requests - while activity-message notifications are unaffected because that path passes its types through. The types are already computed: isShouldNotifyTx() returns a NotifyResult mapping each provider to the NotificationType docs that matched, and the result is passed in as notifyResult. Forward the inbox provider's types instead of discarding them. --- server-plugins/notification-resources/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-plugins/notification-resources/src/index.ts b/server-plugins/notification-resources/src/index.ts index 4a29f177819..ceb252f5f39 100644 --- a/server-plugins/notification-resources/src/index.ts +++ b/server-plugins/notification-resources/src/index.ts @@ -128,7 +128,7 @@ export async function getCommonNotificationTxes ( data, _class, modifiedOn, - [], + (notifyResult.get(notification.providers.InboxNotificationProvider) ?? []).map((t) => t._id), true, tx )