-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Auto Remove Deleted Subscribers from topic #5187
Auto Remove Deleted Subscribers from topic #5187
Conversation
❌ Deploy Preview for dev-web-novu failed.
|
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.
you rock George! ⭐
await this.topicSubscribersRepository.delete({ | ||
_environmentId: subscriber._environmentId, | ||
_organizationId: subscriber._organizationId, | ||
externalSubscriberId: subscriber.subscriberId, | ||
}); |
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.
wow, that was easy peasy :D
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.
easy peasy but we postponed the async matter here, but imo we definitely should start the discussion in order to support possible long processing into an async service like an external queue.
REF https://linear.app/novu/issue/NV-3230/auto-remove-deleted-subscribers-from-topic#comment-13955c84
What change does this PR introduce?
Subscribers can be added in topic using subscriberId.
Subscriber can be deleted later using API or SDK, however a user manually also has to delete them from every topic they where apart of.
Why was this change needed?
If subscriber is deleted, it is still part of topic
Currently user had to call API to first check if subscriber is part of any topic then remove that subscriber from topic.
Definition of Done