Repository navigation
Fix rules notification scoping and reject scoped topic/condition push delivery (breaking change) - #3472
Open
ebariaux wants to merge 23 commits into
Open
Fix rules notification scoping and reject scoped topic/condition push delivery (breaking change)#3472ebariaux wants to merge 23 commits into
ebariaux wants to merge 23 commits into
Conversation
|
This branch has not been deployed
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.



Description
Closes gaps in notification authorization for realm- and asset-scoped rules, including Groovy rules using
notifications.send().Invalid explicit targets reject the whole request. Ineligible recipients discovered during expansion are filtered, preserving eligible recipients.
Breaking change and migration
Realm- and asset-scoped rules can no longer send push notifications using
PushNotificationMessage.targetTypeTOPIC or CONDITION. Firebase resolves these audiences, so their realm and asset scope cannot currently be verified.Rejection happens before notification records are stored or delivery is attempted. This includes Groovy rules and localized messages containing a TOPIC or CONDITION variant, even when other variants or notification targets are valid.
Use DEVICE delivery, or omit
targetTypeto use its DEVICE default, with permitted OpenRemote USER, ASSET or REALM targets for the rule’s scope. Asset-scoped rules cannot target an entire REALM, and restricted user recipients must be directly linked to the scoped asset.DEVICE push notifications also reject CUSTOM targets; use supported OpenRemote targets instead.
Global rules and internal notifications retain their existing TOPIC/CONDITION handling.