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

Group sending is not clear #70

Open
ssharma80 opened this issue Aug 13, 2019 · 0 comments
Open

Group sending is not clear #70

ssharma80 opened this issue Aug 13, 2019 · 0 comments

Comments

@ssharma80
Copy link

Ive found that you have a Group table which can be appended to with a group name. However there is no post method or view for adding a group. Sure it can be done manually. Also, if we have two entries one for a user who is authenticated and the same user being in a group. The send_group_notification sends two notifications. One for the specific user and another for the group which also goes to the same user. This is not correct as you would only want one notification to be sent. This is happening here in save_info method of webpush views.py

    if request.user.is_authenticated or group_name:
        # Save the subscription info with subscription data
        # as the subscription data is a dictionary and its valid
        subscription = subscription_form.get_or_save()
        web_push_form.save_or_delete(
            subscription=subscription, **user=request.user,**
            status_type=status_type, group_name=group_name)

As both group and user information is sent while it should be exclusive one or the other.
The documentation for group creation is sparse and not clear.

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

1 participant