Merge remote-tracking branch 'origin/master' into nlutsenko.telegram_silentnotification

# Conflicts:
#	server/notification-providers/telegram.js
#	src/components/notifications/Telegram.vue
#	src/languages/en.js
This commit is contained in:
Louis Lam
2023-02-24 16:42:57 +08:00
230 changed files with 32249 additions and 17236 deletions

View File

@@ -29,6 +29,10 @@
</p>
</div>
<label for="message_thread_id" class="form-label">{{ $t("telegramMessageThreadID") }}</label>
<input id="message_thread_id" v-model="$parent.notification.telegramMessageThreadID" type="text" class="form-control">
<p class="form-text">{{ $t("telegramMessageThreadIDDescription") }}</p>
<div class="form-check form-switch">
<input v-model="$parentnotification.telegramSendSilently" class="form-check-input" type="checkbox">
<label class="form-check-label">{{ $t("Send Silently") }}</label>
@@ -51,6 +55,11 @@ export default {
HiddenInput,
},
methods: {
/**
* Get the URL for telegram updates
* @param {string} [mode=masked] Should the token be masked?
* @returns {string} formatted URL
*/
telegramGetUpdatesURL(mode = "masked") {
let token = `<${this.$t("YOUR BOT TOKEN HERE")}>`;
@@ -64,6 +73,8 @@ export default {
return `https://api.telegram.org/bot${token}/getUpdates`;
},
/** Get the telegram chat ID */
async autoGetTelegramChatID() {
try {
let res = await axios.get(this.telegramGetUpdatesURL("withToken"));