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

Unsubscribe by attributes should only match a subset of subscriptions #847

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

OrKoN
Copy link
Contributor

@OrKoN OrKoN commented Jan 9, 2025

In #828 I also overlooked that removal of subscriptions should only apply to the first matching subscriptions to be backward compatible. This PR adds steps to account for that and cover the cases like the following:

For events:

subscribe(events=[A, B])
unsubscribe(events=[A]) => works
unsubscribe(events=[A, B]) => expected to throw

For contexts:

subscribe(contexts=[A, B])
unsubscribe(contexts=[A]) => works
unsubscribe(contexts=[A, B]) => expected to throw
subscribe(events=[A])
unsubscribe(events=[A], contexts=[A]) => expected to throw

Preview | Diff

@OrKoN OrKoN force-pushed the orkon/subscription-recover-errors branch from e044d74 to c06c363 Compare January 9, 2025 08:40
@OrKoN OrKoN requested a review from sadym-chromium January 9, 2025 08:43
@OrKoN OrKoN force-pushed the orkon/subscription-recover-errors branch from c06c363 to 636da25 Compare January 9, 2025 09:04
@OrKoN OrKoN force-pushed the orkon/subscription-recover-errors branch from 0e23a4c to 31c2fda Compare January 9, 2025 18:54
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.

1 participant