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

cleanup: Fix logic for implicit subscriptions #2

Merged
merged 3 commits into from
Nov 22, 2023
Merged

Conversation

MaartenGrothus
Copy link
Contributor

Implicit subscriptions should be removed once the respective implicator no longer holds.

Exemplarily, for a club newsletter, this ensures that people which became subscribed due to their membership are unsubscribed once it is terminated.

In doing so, this change removes the implicits_only subscription policy, which is redundant to subscribable with this change.

Another way to go about this would be to add another option for an implicit subscription to be "sticky", i.e. to persist after the implicator is lost if the person still has SubscriptionPolicy.subscribable.
The best way to go about this would be to introduce a new, orthogonal flag, is_sticky, which can be passed to _apply_cleanup and would then replace and policy.is_implicit() with and not is_sticky. In cdedb, this would not be used.

What do you think?

MaartenGrothus and others added 3 commits August 15, 2023 17:42
Implicit subscriptions should be removed once the respective
implicator no longer holds.

Exemplarily, for a club newsletter, this ensures that people
which became subscribed due to their membership are unsubscribed
once it is terminated.

In doing so, this change removes the implicits_only subscription
policy, which is redundant to subscribable with this change.
@larsesser
Copy link
Member

Another way to go about this would be to add another option for an implicit subscription to be "sticky", i.e. to persist after the implicator is lost if the person still has SubscriptionPolicy.subscribable. The best way to go about this would be to introduce a new, orthogonal flag, is_sticky, which can be passed to _apply_cleanup and would then replace and policy.is_implicit() with and not is_sticky. In cdedb, this would not be used.

I think this may be useful, but since we have no imediate use case, I would vote for postponing this. Maybe open up an issue.

@larsesser larsesser merged commit 90f7655 into master Nov 22, 2023
2 checks passed
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 this pull request may close these issues.

2 participants