Skip to content

Commit e36045f

Browse files
refactor(TelegramBotHandler): add doc block and set form_params with topic id
1 parent d73d2e6 commit e36045f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/TelegramBotHandler.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ class TelegramBotHandler extends AbstractProcessingHandler implements HandlerInt
3636
private $chatId;
3737

3838
/**
39-
*
39+
* If chat groups are used instead of telegram channels,
40+
* and the ability to set topics on groups is enabled,
41+
* this configuration can be utilized.
4042
* @var string|null
4143
*/
4244
private $topicId;
@@ -105,7 +107,7 @@ protected function send(string $message, $option = []): void
105107
];
106108

107109
$options = [
108-
'form_params' => $this->topicId === null ? $params + ['message_thread_id' => $this->topicId] : $params
110+
'form_params' => $this->topicId !== null ? $params + ['message_thread_id' => $this->topicId] : $params
109111
];
110112

111113
$response = $httpClient->post($url, $options);

0 commit comments

Comments
 (0)