mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-30 03:16:34 +00:00
Update notification_channels.py
This commit is contained in:
@@ -907,12 +907,12 @@ def create_channel(channel_type: str, config: Dict[str, str]) -> Optional[Notifi
|
|||||||
Channel instance or None if creation fails
|
Channel instance or None if creation fails
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
if channel_type == 'telegram':
|
if channel_type == 'telegram':
|
||||||
return TelegramChannel(
|
return TelegramChannel(
|
||||||
bot_token=config.get('bot_token', ''),
|
bot_token=config.get('bot_token', ''),
|
||||||
chat_id=config.get('chat_id', ''),
|
chat_id=config.get('chat_id', ''),
|
||||||
topic_id=config.get('topic_id', '')
|
topic_id=config.get('topic_id', '')
|
||||||
)
|
)
|
||||||
elif channel_type == 'gotify':
|
elif channel_type == 'gotify':
|
||||||
return GotifyChannel(
|
return GotifyChannel(
|
||||||
server_url=config.get('url', ''),
|
server_url=config.get('url', ''),
|
||||||
|
|||||||
Reference in New Issue
Block a user