chore: rename topicID to threadId like in the telegram API response

This commit is contained in:
peaklabs-dev
2024-12-11 23:13:13 +01:00
parent 09746aa877
commit f88438edd3
7 changed files with 125 additions and 124 deletions

View File

@@ -32,7 +32,7 @@ class SendMessageToTelegramJob implements ShouldBeEncrypted, ShouldQueue
public array $buttons,
public string $token,
public string $chatId,
public ?string $topicId = null,
public ?string $threadId = null,
) {
$this->onQueue('high');
}
@@ -67,8 +67,8 @@ class SendMessageToTelegramJob implements ShouldBeEncrypted, ShouldQueue
'chat_id' => $this->chatId,
'text' => $this->text,
];
if ($this->topicId) {
$payload['message_thread_id'] = $this->topicId;
if ($this->threadId) {
$payload['message_thread_id'] = $this->threadId;
}
$response = Http::post($url, $payload);
if ($response->failed()) {