-
Notifications
You must be signed in to change notification settings - Fork 46
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 check that all events and context ids exist in subscriptions #847
Conversation
e044d74
to
c06c363
Compare
c06c363
to
636da25
Compare
0e23a4c
to
31c2fda
Compare
index.bs
Outdated
@@ -2107,6 +2136,11 @@ The [=remote end steps=] with |session| and |command parameters| are: | |||
|
|||
1. [=list/append=] |partial subscription| to |new subscriptions|. | |||
|
|||
1. If |matched events| does not equal |event names|, return [=error=] with [=error code=] [=invalid argument=]. | |||
|
|||
1. If |top-level traversable context ids| is not empty and |matched contexts| does not equal |
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.
Technically we can simply compare |matched contexts|
and |top-level traversable context ids|
, as for global subscriptions they are both empty, for non-global the latest is non-empty. But the current version makes the algo more readable.
@jgraham PTAL (this is another spec regression from my subscription ID refactoring that I discovered while actually working on the implementation, I believe this is the last one). |
…s exist in subscriptions (#847) * Unsubscribe by attributes should only match a subset of subscriptions * update algorithm * use infra for set comparison
In #828 I also overlooked that removal of subscriptions should only apply if all unsubscribe attributes match existing subscription data. To remain backward compatible, this PR adds steps to account for that and cover the cases like the following:
For events:
For contexts:
Preview | Diff