From c44df0ef7e9c7e0d178875ccf23355dad8d43ed1 Mon Sep 17 00:00:00 2001 From: dhaval-patel262 <60753587+dhaval-patel262@users.noreply.github.com> Date: Fri, 25 Sep 2026 21:51:19 +0530 Subject: [PATCH] fix(notification): pass matched types to common inbox notifications (#11027) 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 4a29f17781..ceb252f5f3 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 )