mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-03 03:07:02 +00:00
feat: Adds support for ntfy's phone call feature (#6640)
This commit is contained in:
@@ -22,7 +22,12 @@ class Ntfy extends NotificationProvider {
|
|||||||
"Authorization": "Bearer " + notification.ntfyaccesstoken,
|
"Authorization": "Bearer " + notification.ntfyaccesstoken,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
let config = { headers };
|
if (notification.ntfyCall) {
|
||||||
|
headers["X-Call"] = notification.ntfyCall;
|
||||||
|
}
|
||||||
|
let config = {
|
||||||
|
headers,
|
||||||
|
};
|
||||||
config = this.getAxiosConfigWithProxy(config);
|
config = this.getAxiosConfigWithProxy(config);
|
||||||
// If heartbeatJSON is null, assume non monitoring notification (Certificate warning) or testing.
|
// If heartbeatJSON is null, assume non monitoring notification (Certificate warning) or testing.
|
||||||
if (heartbeatJSON == null) {
|
if (heartbeatJSON == null) {
|
||||||
|
|||||||
@@ -52,6 +52,13 @@
|
|||||||
<label for="ntfy-icon" class="form-label">{{ $t("IconUrl") }}</label>
|
<label for="ntfy-icon" class="form-label">{{ $t("IconUrl") }}</label>
|
||||||
<input id="ntfy-icon" v-model="$parent.notification.ntfyIcon" type="text" class="form-control">
|
<input id="ntfy-icon" v-model="$parent.notification.ntfyIcon" type="text" class="form-control">
|
||||||
</div>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -913,6 +913,8 @@
|
|||||||
"ntfyPriorityHelptextPriorityHigherThanDown": "Regular priority should be higher than {0} priority. Priority {1} is higher than {0} priority {2}",
|
"ntfyPriorityHelptextPriorityHigherThanDown": "Regular priority should be higher than {0} priority. Priority {1} is higher than {0} priority {2}",
|
||||||
"ntfyPriorityDown": "Priority for DOWN-events",
|
"ntfyPriorityDown": "Priority for DOWN-events",
|
||||||
"ntfyUsernameAndPassword": "Username and Password",
|
"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",
|
"twilioAccountSID": "Account SID",
|
||||||
"twilioApiKey": "Api Key (optional)",
|
"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",
|
"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",
|
||||||
|
|||||||
Reference in New Issue
Block a user