From cb15ea01f27af3d17c5bc536c8aa6a625bd75337 Mon Sep 17 00:00:00 2001 From: BothimTV Date: Thu, 21 Mar 2024 14:28:48 +0100 Subject: [PATCH] Moved the cleanup to the backend. Also changed the helptext to make it better readable. --- server/notification-providers/call-me-bot.js | 4 ++- src/components/notifications/CallMeBot.vue | 38 ++------------------ src/lang/en.json | 4 +-- 3 files changed, 7 insertions(+), 39 deletions(-) diff --git a/server/notification-providers/call-me-bot.js b/server/notification-providers/call-me-bot.js index 88f06c3a..9ed3bb49 100644 --- a/server/notification-providers/call-me-bot.js +++ b/server/notification-providers/call-me-bot.js @@ -10,7 +10,9 @@ class CallMeBot extends NotificationProvider { async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { const okMsg = "Sent Successfully."; try { - await axios.get(`${notification.callMeBotEndpoint}&text=${encodeURIComponent(msg)}`); + const url = new URL(notification.callMeBotEndpoint); + url.searchParams.delete("text"); + await axios.get(`${url}&text=${encodeURIComponent(msg)}`); return okMsg; } catch (error) { this.throwGeneralAxiosError(error); diff --git a/src/components/notifications/CallMeBot.vue b/src/components/notifications/CallMeBot.vue index db7f51ac..2ea39e45 100644 --- a/src/components/notifications/CallMeBot.vue +++ b/src/components/notifications/CallMeBot.vue @@ -1,45 +1,13 @@ - - diff --git a/src/lang/en.json b/src/lang/en.json index 5ffd7a9e..4e27cbc2 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -888,7 +888,5 @@ "What is a Remote Browser?": "What is a Remote Browser?", "wayToGetHeiiOnCallDetails": "How to get the Trigger ID and API Keys is explained in the {documentation}", "documentationOf": "{0} Documentation", - "callMeBotGet": "Get the endpoint for {0}.", - "callMeBotInfo": "Note that you may get rate limited. Example: You are only allowed to send one Telegram call per 65 seconds! Please use the cleanup button to be able to use the URL.", - "callMeBotInvalidEndpoint": "The specifyed endpoint is invalid!" + "callMeBotGet": "Here you can generate an endpoint for {0}, {1} and {2}. Keep in mind that you might get rate limited. You can read more about ratelimits here: {3}" }