From bcc40146c0a304608989c14e3fd52a5784c0fd28 Mon Sep 17 00:00:00 2001 From: Stevche Radevski Date: Thu, 8 Aug 2024 17:08:39 +0200 Subject: [PATCH] fix: Use local notification provider for feed channel by default --- .../common/__tests__/define-config.spec.ts | 24 +++++++++++++++++++ .../core/utils/src/common/define-config.ts | 4 ++++ 2 files changed, 28 insertions(+) diff --git a/packages/core/utils/src/common/__tests__/define-config.spec.ts b/packages/core/utils/src/common/__tests__/define-config.spec.ts index f312922edf078..b519b29eb80df 100644 --- a/packages/core/utils/src/common/__tests__/define-config.spec.ts +++ b/packages/core/utils/src/common/__tests__/define-config.spec.ts @@ -45,6 +45,12 @@ describe("defineConfig", function () { "providers": [ { "id": "local", + "options": { + "channels": [ + "feed", + ], + "name": "Local Notification Provider", + }, "resolve": "@medusajs/notification-local", }, ], @@ -138,6 +144,12 @@ describe("defineConfig", function () { "providers": [ { "id": "local", + "options": { + "channels": [ + "feed", + ], + "name": "Local Notification Provider", + }, "resolve": "@medusajs/notification-local", }, ], @@ -228,6 +240,12 @@ describe("defineConfig", function () { "providers": [ { "id": "local", + "options": { + "channels": [ + "feed", + ], + "name": "Local Notification Provider", + }, "resolve": "@medusajs/notification-local", }, ], @@ -320,6 +338,12 @@ describe("defineConfig", function () { "providers": [ { "id": "local", + "options": { + "channels": [ + "feed", + ], + "name": "Local Notification Provider", + }, "resolve": "@medusajs/notification-local", }, ], diff --git a/packages/core/utils/src/common/define-config.ts b/packages/core/utils/src/common/define-config.ts index f867c4b794783..a23a90668fb78 100644 --- a/packages/core/utils/src/common/define-config.ts +++ b/packages/core/utils/src/common/define-config.ts @@ -113,6 +113,10 @@ export function defineConfig(config: Partial = {}): ConfigModule { { resolve: "@medusajs/notification-local", id: "local", + options: { + name: "Local Notification Provider", + channels: ["feed"], + }, }, ], },