Update notification service

This commit is contained in:
MacRimi
2026-02-19 20:51:54 +01:00
parent bd28e312fc
commit d5954a3a32
3 changed files with 84 additions and 10 deletions

View File

@@ -133,7 +133,11 @@ class TelegramChannel(NotificationChannel):
def __init__(self, bot_token: str, chat_id: str):
super().__init__()
self.bot_token = bot_token.strip()
token = bot_token.strip()
# Strip 'bot' prefix if user included it (API_BASE already adds it)
if token.lower().startswith('bot') and ':' in token[3:]:
token = token[3:]
self.bot_token = token
self.chat_id = chat_id.strip()
def validate_config(self) -> Tuple[bool, str]: