fix(notification): Only use enabled providers for notis (#10659)

This commit is contained in:
Oli Juhl
2024-12-18 13:59:12 +01:00
committed by GitHub
parent c7008bb569
commit 9133957a94
@@ -68,7 +68,9 @@ export default class NotificationProviderService extends ModulesSdkUtils.MedusaI
TOutput = TChannel extends string[] ? Provider[] : Provider | undefined
>(channels: TChannel): Promise<TOutput> {
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) =>