Open matthewh opened 7 years ago
Sure, sounds useful.
What's your comfort level on adding an optional dependency django-filter to handle the device filtering? If you are using DRF, then django_filters would be required as well.
Seems unnecessary. I won't refuse it outright but it has to be justified.
I do not associate devices with the django user model. Instead, the name field is set to the an identifier that is linked to a user account in another system. Essentially django-push-notifications runs by itself in a docker container and handles device registrations from iOS and Android clients and sends push notifications at the request of the backend infrastructure using a route like the one mentioned above.
We evaluated several other products (commercial and open source) in this space that could be self hosted. Many of them had deficiencies that we could not work around. Chiefly, allowing the same token to be present multiple times.
Given the current django-push-notifications model, ways to filter devices for sending a push message:
Given the extended model I use:
django-filter let's me easily add arbitrary filtering. I realize it's not complex but I would prefer not to reinvent the wheel.
Sorry, I thought i was in a different issue - that's what I get for juggling too many things at once.
Yes, depending on a DRF subdependency is fine within DRF itself. Make sure not to add the dependency in other parts of DPN.
@jleclanche, I'm working on a feature to add DRF support for triggering a push message via HTTP POST.
Example: POST /api/v1/push/ with a JSON payload:
Message includes all of the message details. With each platforms specific options defined individually. Optional filters would allow for bulk notifications against devices matching the criteria.
Is this a feature that you would be interested in including in django-push-notifications?