Skip to content
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

ValueError: messages must not contain more than 500 elements #730

Closed
Pablo849 opened this issue Jun 19, 2024 · 1 comment
Closed

ValueError: messages must not contain more than 500 elements #730

Pablo849 opened this issue Jun 19, 2024 · 1 comment

Comments

@Pablo849
Copy link

I have 556 FCM devices in my system. When I try to send a bulk message to all devices, I get "ValueError: messages must not contain more than 500 elements".
I found a settings parameter in push_notifications/conf/app.py -> MAX_RECIPIENTS. But is not clear in docs how to define this parameter.
How can I set it correctly?
I use firebase_admin.initialize_app(credentials=cred) with firebase credentials JSON file.

@jamaalscarlett
Copy link
Member

You need to set the FCM_ MAX_RECIPIENTS setting value. See:

PUSH_NOTIFICATIONS_SETTINGS.setdefault("FCM_MAX_RECIPIENTS", 500)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants