payload-plugin-newsletter 0.25.0 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [0.25.1] - 2025-08-09
2
+
3
+ ### Fixed
4
+ - **Removed webhook status updates**: Eliminated permission errors when processing Broadcast webhooks
5
+ - Webhook handler no longer attempts to update global settings
6
+ - Fixes "Only administrators can modify newsletter settings" errors
7
+
8
+ ### Changed
9
+ - **Webhook subscribers now start as active**: `subscriber.created` webhook events now set status as 'active' instead of 'pending'
10
+ - Better aligns with single opt-in workflows
11
+ - Matches Broadcast's confirmed subscriber status
12
+ - Welcome emails still prevented by `importedFromProvider` flag
13
+
1
14
  ## [0.25.0] - 2025-08-08
2
15
 
3
16
  ### Changed
package/dist/server.js CHANGED
@@ -2637,8 +2637,8 @@ async function handleSubscriberCreated(event, payload, subscribersSlug) {
2637
2637
  data: {
2638
2638
  email: data.email,
2639
2639
  name: data.name,
2640
- subscriptionStatus: "pending",
2641
- // New subscribers start as pending
2640
+ subscriptionStatus: "active",
2641
+ // Match Broadcast's active status
2642
2642
  externalId: data.id,
2643
2643
  source: data.source,
2644
2644
  importedFromProvider: true,
@@ -2907,16 +2907,6 @@ var createBroadcastWebhookEndpoint = (config) => {
2907
2907
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
2908
2908
  });
2909
2909
  await routeWebhookEvent(data, req, config);
2910
- await req.payload.updateGlobal({
2911
- slug: config.settingsSlug || "newsletter-settings",
2912
- data: {
2913
- broadcastSettings: {
2914
- ...settings?.broadcastSettings || {},
2915
- lastWebhookReceived: (/* @__PURE__ */ new Date()).toISOString(),
2916
- webhookStatus: "verified"
2917
- }
2918
- }
2919
- });
2920
2910
  return Response.json({ success: true }, { status: 200 });
2921
2911
  } catch (error) {
2922
2912
  console.error("[Broadcast Webhook] Error processing webhook:", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload-plugin-newsletter",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "Complete newsletter management plugin for Payload CMS with subscriber management, magic link authentication, and email service integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",