Skip to content

Commit

Permalink
Update README: tag expressions can now include parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
collimarco authored Aug 30, 2024
1 parent c301ba6 commit d8d83a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ notification.deliver_to((user1_id, user2_id, user3_id), tags=('events',))
# e.g. any subscriber that has the tag "segment1" OR "segment2"
notification.broadcast(tags=('segment1', 'segment2'))

# you can use boolean expressions
# they must be in the disjunctive normal form (without parenthesis)
# you can use boolean expressions
# they can include parentheses and the operators !, &&, || (from highest to lowest precedence)
# https://pushpad.xyz/docs/tags
notification.broadcast(tags='zip_code:28865 && !optout:local_events || friend_of:Organizer123')
notification.deliver_to((user1_id, user2_id), tags=('tag1 && tag2', 'tag3')) # equal to 'tag1 && tag2 || tag3'

Expand Down

0 comments on commit d8d83a3

Please sign in to comment.