Skip to content

Commit

Permalink
Merge pull request #39 from Laravel-Lang/1.x
Browse files Browse the repository at this point in the history
Fixed Attempt to read property "thread_id" on null
  • Loading branch information
andrey-helldar authored Mar 27, 2024
2 parents 2180857 + ed17584 commit ed4f4ca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions actions/2024_03_27_145320_retry_failed_jobs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

use DragonCode\LaravelActions\Action;

return new class extends Action {
protected bool $before = false;

public function __invoke(): void
{
$this->artisan('queue:retry', ['id' => 'all']);
}
};
2 changes: 1 addition & 1 deletion app/Jobs/Telegram/ReleaseJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function failed(?Throwable $exception): void
protected function sendTelegram(): void
{
retry(5, function () {
($id = $this->chat->thread_id)
($id = $this->chat()->thread_id)
? $this->chat()->html($this->message())->withData('message_thread_id', $id)->send()
: $this->chat()->html($this->message())->send();
});
Expand Down

0 comments on commit ed4f4ca

Please sign in to comment.