Rafael Dutra
unread,Oct 9, 2024, 11:03:28 AMOct 9Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Firebase Google Group
Hi everyone,
I have a question regarding the limitations of the condition field when sending notifications.
Are there any specific restrictions or limits applied to the condition field? For example, is there a limit on the size of the condition or the number of topics that can be included in a single condition? I haven’t been able to find any documentation addressing this issue so far.
I plan to create multiple topics, ranging from broad to more specific, to send notifications. For instance, I could send a generic notification to all users, or filter out certain groups based on conditions like these:
'all_users' in topics && 'users_active' in topics — Notify all active users
'all_users' in topics && 'users_active' in topics && 'users_city_somewhere' in topics — Notify all active users in a specific city
The challenge starts when I need to be even more specific. For example, not all active users in a city should receive certain notifications. A small group might not qualify, and the qualifications can change dynamically, even minute by minute.
One suggestion I found was to create a topic for each user and then exclude specific users using a condition like this:
'all_users' in topics && 'users_active' in topics && 'users_city_somewhere' in topics && !('user_x' in topics)
However, this could result in very large conditions, which brings me back to my original concern.
Has anyone faced a similar challenge? If so, did you find a better approach to handle such dynamic conditions efficiently?
Thanks in advance for your insights!