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

feat: allow to send the headers parameters to pywebpush #118

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

aleaxis09
Copy link

  • Version of pywebpush updated using >= (Latest versions of pywebpush receive headers parameters).
  • Added headers parameter to the django-webpush functions, empty dict by default.
  • For apple web push notifications some headers are added by default.
  • Documentation updated.



def send_notification_to_group(group_name, payload, ttl=0):
def send_notification_to_group(group_name, payload, ttl=0, headers={}):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not good idea to take default mutable value. Can you please change it?

@@ -3,11 +3,11 @@
from .utils import send_notification_to_group, send_notification_to_user


def send_group_notification(group_name, payload, ttl=0):
def send_group_notification(group_name, payload, ttl=0, headers={}):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well

@safwanrahman
Copy link
Owner

Thanks for the PR. Can you make the changes for mutable default value so we can merge it?

@josephetareh
Copy link

any updates on merging this?

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

Successfully merging this pull request may close these issues.

4 participants