Skip to content

Urgency option set to HighΒ #112

@Light407

Description

@Light407

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions