Skip to content
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

bug: Unsubscribe credits not decrementing when using the newsletter modal button #209

Open
aryanprince opened this issue Aug 11, 2024 · 0 comments · May be fixed by #210
Open

bug: Unsubscribe credits not decrementing when using the newsletter modal button #209

aryanprince opened this issue Aug 11, 2024 · 0 comments · May be fixed by #210

Comments

@aryanprince
Copy link

aryanprince commented Aug 11, 2024

Summary

Unsubscribing to a newsletter from the newsletter modal (after double-clicking an email) is broken and needs a fix ASAP. See GIFs below for a quick demo.

Issue

On the bulk unsubscribe page, using the table row action buttons to unsubscribe correctly redirects to the unsubscribe link, decrements the credit count, and triggers necessary background processes like Posthog analytics.

However, when unsubscribing after opening an email in the newsletter modal (by double-clicking any newsletter), the process only redirects to the unsubscribe link but fails to perform any other actions. This includes not decrementing the credits or updating the newsletter status. As a result, users can access the unsubscribe link, but the app doesn’t reflect the action or adjust their remaining credits.

Impact

Huge loophole. I tried this and was able to unsubscribe to more than the free limit of 5 newsletters. Additionally, the expected behavior doesn't work since it doesn't update the status of the newsletter either.

Solution

I’m currently working on a PR to fix this issue. The solution should be straightforward.

Demo

Below GIF showcases unsubscribing to a newsletter from the table row action button. This works as expected.

Error - Unsubbing using direct unsub button

Below GIF showcases unsubscribing to a newsletter from the newsletter model menu. This does not work as expected.

Error - Unsubbing using email dialog menu

aryanprince added a commit to aryanprince/inbox-zero that referenced this issue Aug 11, 2024
- Pass the `mutate` prop from parent component to the `NewsletterModal` component
- Uses the `useUnsubscribeButton` hook to manage the newsletter unsubscription
- On clicking the unsubscribe button from the modal, calls the `onUnsubscribe` function from the `useUnsubscribeButton` hook

Fixes elie222#209
@aryanprince aryanprince linked a pull request Aug 11, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant