feat: Adds support for ntfy's phone call feature (#6640)

2.2.X
Erik Benoist 1 month ago committed by GitHub
parent d05303963d
commit e31ef63b01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -22,7 +22,12 @@ class Ntfy extends NotificationProvider {
"Authorization": "Bearer " + notification.ntfyaccesstoken,
};
}
let config = { headers };
if (notification.ntfyCall) {
headers["X-Call"] = notification.ntfyCall;
}
let config = {
headers,
};
config = this.getAxiosConfigWithProxy(config);
// If heartbeatJSON is null, assume non monitoring notification (Certificate warning) or testing.
if (heartbeatJSON == null) {

@ -52,6 +52,13 @@
<label for="ntfy-icon" class="form-label">{{ $t("IconUrl") }}</label>
<input id="ntfy-icon" v-model="$parent.notification.ntfyIcon" type="text" class="form-control">
</div>
<div class="mb-3">
<label for="ntfy-call" class="form-label">{{ $t("ntfyCall") }}</label>
<input id="ntfy-call" v-model="$parent.notification.ntfyCall" type="text" class="form-control" placeholder="yes or +12223334444">
<div class="form-text">
{{ $t("ntfyCallHelptext") }}
</div>
</div>
</template>
<script>

@ -913,6 +913,8 @@
"ntfyPriorityHelptextPriorityHigherThanDown": "Regular priority should be higher than {0} priority. Priority {1} is higher than {0} priority {2}",
"ntfyPriorityDown": "Priority for DOWN-events",
"ntfyUsernameAndPassword": "Username and Password",
"ntfyCall": "Phone Call",
"ntfyCallHelptext": "Make a phone call when alert fires. Set to 'yes' to use your first verified number, or enter a specific phone number (e.g. +12223334444). Requires ntfy Pro and a verified phone number.",
"twilioAccountSID": "Account SID",
"twilioApiKey": "Api Key (optional)",
"twilioApiKeyHelptext": "The API key is optional but recommended. You can provide either Account SID and AuthToken from the may TwilioConsole page or Account SID and the pair of Api Key and Api Key secret",

Loading…
Cancel
Save