-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Fix SSE topic filters #2986
Fix SSE topic filters #2986
Conversation
Signed-off-by: Jan N. Klug <github@klug.nrw>
Please hold on merging this as the UI is probably making requests that assume the current syntax, so the impact has to be assessed. |
According to the list you showed in the linked issue everything should be fine, since proper matching is done for all things, items, rules and addons ( You would only be affected if you subscribed to |
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.
LGTM! Did you already have a look @ghys?
Yes sorry I agree with @J-N-K's assessment! My earlier remark was just out of an abundance of caution, but it turns out it's fine. |
@J-N-K : does this change break my event subscription? |
No, it‘ll only break if your subscription does not end with * AND you rely on an implicitly added * at the end (your subscription ends with |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/openhab-3-3-release-discussion/136925/71 |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/problems-subscribing-to-events-in-habapp/137124/6 |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/habapp-1-0-beta-test/136952/25 |
Signed-off-by: Jan N. Klug <github@klug.nrw> GitOrigin-RevId: cdf876c
Fixes #2473
According to the documentation, topic filters are regular expressions. The SSE topic filters are converted to regular expressions, therefore
openhab/items/*/state
should result inopenhab/items/.*/state
. The code however adds a.*
at the endopenhab/items/.*/state.*
. This makes it impossible to filter for/state
but exclude/statechanged
, which is IMO expected.Signed-off-by: Jan N. Klug github@klug.nrw