fix: telegram 修复消息内存在横杠无法发出的bug

This commit is contained in:
xiaojunnuo
2025-12-15 15:12:07 +08:00
parent 16f6365b18
commit 5f4469e306

View File

@@ -60,7 +60,7 @@ export class TelegramNotification extends BaseNotification {
replaceText(text: string) {
// .*()<> 等都需要用\\进行替换
return text.replace(/[\\.*()<>]/g, '\\$&');
return text.replace(/[\\.*()<>-]/g, '\\$&');
}
async send(body: NotificationBody) {
if (!this.botToken || !this.chatId) {