We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0a124a2 + ef1165f commit 8a985c8Copy full SHA for 8a985c8
src/Commands/Command.php
@@ -418,10 +418,16 @@ protected function removeNonPrivateMessage(): bool
418
public function replyToChat(string $text, array $data = []): ServerResponse
419
{
420
if ($message = $this->getMessage() ?: $this->getEditedMessage() ?: $this->getChannelPost() ?: $this->getEditedChannelPost()) {
421
- return Request::sendMessage(array_merge([
+ $reply = [
422
'chat_id' => $message->getChat()->getId(),
423
'text' => $text,
424
- ], $data));
+ ];
425
+
426
+ if ($message->getIsTopicMessage()) {
427
+ $reply['message_thread_id'] = $message->getMessageThreadId();
428
+ }
429
430
+ return Request::sendMessage(array_merge($reply, $data));
431
}
432
433
return Request::emptyResponse();
0 commit comments