feat: support '*' wildcard on department for subscriptions#8
Open
BatLeDev wants to merge 1 commit into
Open
Conversation
eab2266 to
744f173
Compare
A subscription can now use `sender.department: '*'` to receive every event of an organization regardless of department. Previously the `*` value was stored and matched literally, so such a subscription matched nothing. `getSubscriptionsFilter` now broadens the department clause: a root event (no department) matches subscriptions without a department or with `*`, and a departmental event matches its own department or `*`. Broadcast events (`department: '*'`) keep matching every subscription as before. Also add `<meta name="robots" content="noindex">` to ui/index.html. Ref: koumoul/plateforme work item 1739
744f173 to
0793d91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support a
*wildcard on a subscription'ssender.department, so an "any-department" subscription receives both root (no-department) and departmental events for the organization.Why: let a root member subscribe once to a topic across every department of an org, instead of subscribing per department.
Also in this branch: aligns the Playwright config with the data-fair/portals template —
test-unit/test-api/test-e2escripts, ane2e-warmupproject that pre-compiles heavy Vite dev routes before the e2e specs, and explicit timeouts.ui/index.htmlalso gains<meta name="robots" content="noindex">to match the portals template.Regression risks:
getSubscriptionsFilternow builds a$oronsender.departmentinstead of a scalar equality; behavior intentionally broadens so*subscriptions also match.$oris set in only one place in the function, so there's no clobbering.retriesgoes from0to1, which can mask newly-flaky tests.noindexon the UI stops search engines indexing it.