@ -27,7 +27,7 @@ class Whapi extends NotificationProvider {
"body": msg,
};
let url = notification.whapiApiUrl + "/messages/text";
let url = (notification.whapiApiUrl || "https://gate.whapi.cloud/").replace(/\/+$/, "") + "/messages/text";
await axios.post(url, data, config);
@ -1,7 +1,7 @@
<template>
<div class="mb-3">
<label for="whapi-api-url" class="form-label">{{ $t("API URL") }}</label>
<input id="whapi-api-url" v-model="$parent.notification.whapiApiUrl" type="text" class="form-control" required>
<input id="whapi-api-url" v-model="$parent.notification.whapiApiUrl" placeholder="https://gate.whapi.cloud/" type="text" class="form-control">
</div>