Telegram: Fix undefined array key (#15025)

This commit is contained in:
Jellyfrog 2023-05-09 14:35:12 +02:00 committed by GitHub
parent 927446db7b
commit a27a53cc03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ class Telegram extends Transport
public function deliverAlert($obj, $opts)
{
$telegram_opts['chat_id'] = $this->config['telegram-chat-id'];
$telegram_opts['message_thread_id'] = $this->config['message-thread-id'];
$telegram_opts['message_thread_id'] = $this->config['message-thread-id'] ?? null;
$telegram_opts['token'] = $this->config['telegram-token'];
$telegram_opts['format'] = $this->config['telegram-format'];