From 9133957a947b80d9a466727eb5c33ab5105c1db2 Mon Sep 17 00:00:00 2001 From: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:59:12 +0100 Subject: [PATCH] fix(notification): Only use enabled providers for notis (#10659) --- .../notification/src/services/notification-provider.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/modules/notification/src/services/notification-provider.ts b/packages/modules/notification/src/services/notification-provider.ts index adb07b7904a5d..26fdb3f81b15c 100644 --- a/packages/modules/notification/src/services/notification-provider.ts +++ b/packages/modules/notification/src/services/notification-provider.ts @@ -68,7 +68,9 @@ export default class NotificationProviderService extends ModulesSdkUtils.MedusaI TOutput = TChannel extends string[] ? Provider[] : Provider | undefined >(channels: TChannel): Promise { if (!this.providersCache) { - const providers = await this.notificationProviderRepository_.find() + const providers = await this.notificationProviderRepository_.find({ + where: { is_enabled: true }, + }) this.providersCache = new Map( providers.flatMap((provider) =>