Merge pull request #2334 from nlutsenko/nlutsenko.telegram_silentnotification

Add ability to send Telegram notifications silently, behind a setting.
pull/2595/head
Louis Lam 2 years ago committed by GitHub
commit b923ba72ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,6 +12,7 @@ class Telegram extends NotificationProvider {
let params = {
chat_id: notification.telegramChatID,
text: msg,
disable_notification: notification.telegramSendSilently ?? false,
};
if (notification.telegramMessageThreadID) {
params.message_thread_id = notification.telegramMessageThreadID;

@ -32,6 +32,15 @@
<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="$parent.notification.telegramSendSilently" class="form-check-input" type="checkbox">
<label class="form-check-label">{{ $t("telegramSendSilently") }}</label>
</div>
<div class="form-text">
{{ $t("telegramSendSilentlyDescription") }}
</div>
</div>
</template>

@ -363,6 +363,8 @@
"Chat ID": "Chat ID",
"telegramMessageThreadID": "(Optional) Message Thread ID",
"telegramMessageThreadIDDescription": "Optional Unique identifier for the target message thread (topic) of the forum; for forum supergroups only",
"telegramSendSilently": "Send Silently",
"telegramSendSilentlyDescription": "Sends the message silently. Users will receive a notification with no sound.",
"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:",
"YOUR BOT TOKEN HERE": "YOUR BOT TOKEN HERE",

Loading…
Cancel
Save