Skip to content

Commit c77b407

Browse files
minor symfony#49695 [Notifier] Add "retry" and "expire" options to Pushover bridge (vlepeule)
This PR was squashed before being merged into the 6.3 branch. Discussion ---------- [Notifier] Add "retry" and "expire" options to Pushover bridge | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Add "retry" and "expire" options to handle "Emergency Priority", according to [Pushover API documentation](https://pushover.net/api#priority) : > To send an emergency-priority notification, the priority parameter must be set to 2 and the retry and expire parameters must be supplied. Commits ------- 2feabc6 [Notifier] Add "retry" and "expire" options to Pushover bridge
2 parents d34e4fc + 2feabc6 commit c77b407

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/Symfony/Component/Notifier/Bridge/Pushover/PushoverOptions.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,30 @@ public function priority(int $priority): static
124124
return $this;
125125
}
126126

127+
/**
128+
* @see https://pushover.net/api#priority
129+
*
130+
* @return $this
131+
*/
132+
public function expire(int $seconds): static
133+
{
134+
$this->options['expire'] = $seconds;
135+
136+
return $this;
137+
}
138+
139+
/**
140+
* @see https://pushover.net/api#priority
141+
*
142+
* @return $this
143+
*/
144+
public function retry(int $seconds): static
145+
{
146+
$this->options['retry'] = $seconds;
147+
148+
return $this;
149+
}
150+
127151
/**
128152
* @see https://pushover.net/api#sounds
129153
*

0 commit comments

Comments
 (0)