Skip to content

Commit 4448d84

Browse files
committed
fix typo
1 parent bf82075 commit 4448d84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,16 @@ use Minishlink\WebPush\WebPush;
9999

100100
$defaultOptions = array(
101101
'TTL' => 300, // defaults to 4 weeks
102-
'urgency' => 'normal',
103-
'topic' => 'new_event',
102+
'urgency' => 'normal', // protocol defaults to "normal"
103+
'topic' => 'new_event', // not defined by default
104104
);
105105

106106
// for every notifications
107107
$webPush = new WebPush(array(), $defaultOptions);
108108
$webPush->setDefaultOptions($defaultOptions);
109109

110110
// or for one notification
111-
$webPush->sendNotification($endpoint, $payload, $userPublicKey, $userAuthToken, true, array('TTL' => 5000));
111+
$webPush->sendNotification($endpoint, $payload, $userPublicKey, $userAuthToken, $flush, array('TTL' => 5000));
112112
```
113113

114114
#### TTL
@@ -122,7 +122,7 @@ zones, and if they don't several hours will suffice.
122122
Urgency can be either "very-low", "low", "normal", or "high". If the browser vendor has implemented this feature, it will save battery life on mobile devices (cf. [protocol](https://tools.ietf.org/html/draft-ietf-webpush-protocol-08#section-5.3)).
123123

124124
#### topic
125-
Similar to the old `collapse_key` on legacy GCM servers, this string will make the vendor show to the user only the last notification of this topic (cf. [protocol]((cf. [protocol](https://tools.ietf.org/html/draft-ietf-webpush-protocol-08#section-5.4)))).
125+
Similar to the old `collapse_key` on legacy GCM servers, this string will make the vendor show to the user only the last notification of this topic (cf. [protocol](https://tools.ietf.org/html/draft-ietf-webpush-protocol-08#section-5.4)).
126126

127127
### Payload length and security
128128
Payload will be encrypted by the library. The maximum payload length is 4078 bytes (or ASCII characters).

0 commit comments

Comments
 (0)