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

Urgency option set to High #112

Open
Light407 opened this issue Nov 22, 2024 · 0 comments
Open

Urgency option set to High #112

Light407 opened this issue Nov 22, 2024 · 0 comments

Comments

@Light407
Copy link

Light407 commented Nov 22, 2024

Hi, does anyone know how to set the Urgency option to High in the options? Not sure how I can combine that and vapiddetails, right now I am doing like this

 var vapidDetailsObject = new Dictionary<string, string>
 {
     { "subject", "mailto:[email protected]"},
     { "publicKey", _publicKey },
     { "privateKey", _privateKey }
 };

 var options = new Dictionary<string, object>
 {
     { "vapidDetails", vapidDetailsObject},
     { "urgency", "high" },
 };

await webPushClient.SendNotificationAsync(pushSubscription, payload, options);

And then received error

System.ArgumentException: 'urgency is an invalid options. The valid options areheaders,gcmAPIKey,vapidDetails,TTL'

But according to this link it should be a valid option: https://github.com/web-push-libs/web-push

Saw in the code that it seems hardcoded which options to allow but how can I set urgency to high?

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