-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(unsubscribe): add one-click unsubscribe #2467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds RFC 8058 compliant one-click unsubscribe support for marketing emails. The changes enable email clients to display a native "Unsubscribe" button by adding proper
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant EC as Email Client
participant API as Unsubscribe API
participant DB as Database
Note over EC,DB: One-Click Unsubscribe Flow (RFC 8058)
EC->>API: POST /unsubscribe (form-urlencoded)<br/>with email and token in URL
API->>API: Detect form-urlencoded content type
API->>API: Parse email and token from URL params
API->>API: Verify unsubscribe token
API->>DB: Update email preferences
DB-->>API: Success
API-->>EC: 200 OK
Note over EC,DB: Traditional Unsubscribe Flow
EC->>API: POST /unsubscribe (JSON body)
API->>API: Parse JSON body with email, token, type
API->>API: Verify unsubscribe token
API->>DB: Update email preferences
DB-->>API: Success
API-->>EC: 200 OK with message
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 2 comments
Summary
Type of Change
Testing
Tested manually
Checklist