From b02ce036b5c313c2bf4750dce8b12bdd3e632094 Mon Sep 17 00:00:00 2001
From: Ramin Mazloomi <mazloomi.drsaina@gmail.com>
Date: Fri, 21 Mar 2025 05:54:49 +0330
Subject: [PATCH] Apply review notes

---
 src/components/notifications/Telegram.vue | 16 +++++++++++++---
 src/lang/en.json                          |  2 +-
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/components/notifications/Telegram.vue b/src/components/notifications/Telegram.vue
index 3c8425759..145a5c94e 100644
--- a/src/components/notifications/Telegram.vue
+++ b/src/components/notifications/Telegram.vue
@@ -35,7 +35,18 @@
 
         <label for="server_url" class="form-label">{{ $t("telegramServerUrl") }}</label>
         <input id="server_url" v-model="$parent.notification.telegramServerUrl" type="text" class="form-control">
-        <p class="form-text">{{ $t("telegramServerUrlDescription") }}</p>
+        <div class="form-text">
+            <i18n-t keypath="telegramServerUrlDescription">
+                <a
+                    href="https://core.telegram.org/bots/api#using-a-local-bot-api-server"
+                    target="_blank"
+                >{{ $t("here") }}</a>
+                <a
+                    href="https://api.telegram.org"
+                    target="_blank"
+                >https://api.telegram.org</a>
+            </i18n-t>
+        </div>
     </div>
 
     <div class="mb-3">
@@ -125,7 +136,6 @@ Uptime Kuma Alert{% if monitorJSON %} - {{ monitorJSON['name'] }}{% endif %}
          * @returns {string} formatted URL
          */
         telegramGetUpdatesURL(mode = "masked") {
-            let serverUrl = this.$parent.notification.telegramServerUrl;
             let token = `<${this.$t("YOUR BOT TOKEN HERE")}>`;
 
             if (this.$parent.notification.telegramBotToken) {
@@ -136,7 +146,7 @@ Uptime Kuma Alert{% if monitorJSON %} - {{ monitorJSON['name'] }}{% endif %}
                 }
             }
 
-            return `${serverUrl}/bot${token}/getUpdates`;
+            return `${this.$parent.notification.telegramServerUrl}/bot${token}/getUpdates`;
         },
 
         /**
diff --git a/src/lang/en.json b/src/lang/en.json
index 65022d93a..cb704b0fe 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -430,7 +430,7 @@
     "supportTelegramChatID": "Support Direct Chat / Group / Channel's Chat ID",
     "wayToGetTelegramChatID": "You can get your chat ID by sending a message to the bot and going to this URL to view the chat_id:",
     "telegramServerUrl": "(Optional) Server Url",
-    "telegramServerUrlDescription": "Telegram custom bot api server url. Defaults to https://api.telegram.org if empty.",
+    "telegramServerUrlDescription": "To lift Telegram's bot api limitations or gain access in blocked areas (China, Iran, etc). For more information click {0}. Default: {1}",
     "YOUR BOT TOKEN HERE": "YOUR BOT TOKEN HERE",
     "chatIDNotFound": "Chat ID is not found; please send a message to this bot first",
     "disableCloudflaredNoAuthMsg": "You are in No Auth mode, a password is not required.",