Skip to content

Commit

Permalink
Merge pull request louislam#3156 from maximilian-krauss/feat/add-push…
Browse files Browse the repository at this point in the history
…over-ttl

feat: Adds message ttl to pushover notification
  • Loading branch information
louislam authored May 26, 2023
2 parents c1efe0f + a0d0d5b commit bc95875
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/notification-providers/pushover.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class Pushover extends NotificationProvider {
if (notification.pushoverdevice) {
data.device = notification.pushoverdevice;
}
if (notification.pushoverttl) {
data.ttl = notification.pushoverttl;
}

try {
if (heartbeatJSON == null) {
Expand Down
2 changes: 2 additions & 0 deletions src/components/notifications/Pushover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
<option value="vibrate">{{ $t("pushoversounds vibrate") }}</option>
<option value="none">{{ $t("pushoversounds none") }}</option>
</select>
<label for="pushover-ttl" class="form-label">{{ $t("pushoverMessageTtl") }}</label>
<input id="pushover-ttl" v-model="$parent.notification.pushoverttl" type="number" min="0" step="1" class="form-control">
<div class="form-text">
<span style="color: red;"><sup>*</sup></span>{{ $t("Required") }}
<i18n-t tag="p" keypath="More info on:" style="margin-top: 8px;">
Expand Down
1 change: 1 addition & 0 deletions src/lang/de-CH.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
"More info on:": "Mehr Infos auf: {0}",
"pushoverDesc1": "Notfallpriorität (2) hat standardmässig 30 Sekunden Auszeit zwischen den Versuchen und läuft nach 1 Stunde ab.",
"pushoverDesc2": "Fülle das Geräte Feld aus, wenn du Benachrichtigungen an verschiedene Geräte senden möchtest.",
"pushoverMessageTtl": "Message TTL (Sekunden)",
"SMS Type": "SMS Typ",
"octopushTypePremium": "Premium (Schnell - zur Benachrichtigung empfohlen)",
"octopushTypeLowCost": "Kostengünstig (Langsam - manchmal vom Betreiber gesperrt)",
Expand Down
1 change: 1 addition & 0 deletions src/lang/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
"More info on:": "Mehr Infos auf: {0}",
"pushoverDesc1": "Notfallpriorität (2) hat standardmäßig 30 Sekunden Auszeit zwischen den Versuchen und läuft nach 1 Stunde ab.",
"pushoverDesc2": "Fülle das Geräte Feld aus, wenn du Benachrichtigungen an verschiedene Geräte senden möchtest.",
"pushoverMessageTtl": "Message TTL (Sekunden)",
"SMS Type": "SMS Typ",
"octopushTypePremium": "Premium (Schnell - zur Benachrichtigung empfohlen)",
"octopushTypeLowCost": "Kostengünstig (Langsam - manchmal vom Betreiber gesperrt)",
Expand Down
1 change: 1 addition & 0 deletions src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@
"More info on:": "More info on: {0}",
"pushoverDesc1": "Emergency priority (2) has default 30 second timeout between retries and will expire after 1 hour.",
"pushoverDesc2": "If you want to send notifications to different devices, fill out Device field.",
"pushoverMessageTtl": "Message TTL (Seconds)",
"SMS Type": "SMS Type",
"octopushTypePremium": "Premium (Fast - recommended for alerting)",
"octopushTypeLowCost": "Low Cost (Slow - sometimes blocked by operator)",
Expand Down

0 comments on commit bc95875

Please sign in to comment.