Ooof, got the dependencies all up to date as well
Lots of tests needed fixing, but it seemed to be a whitespace parsing
error in the view files 🤔
This commit is contained in:
parent
ec01b3c6a2
commit
b2b6693aec
61 changed files with 2057 additions and 1441 deletions
|
@ -5,7 +5,9 @@ declare(strict_types=1);
|
|||
namespace App\Jobs;
|
||||
|
||||
use App\Models\Like;
|
||||
use Codebird\Codebird;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Thujohn\Twitter\Facades\Twitter;
|
||||
|
@ -19,14 +21,18 @@ use Jonnybarnes\WebmentionsParser\Exceptions\AuthorshipParserException;
|
|||
|
||||
class ProcessLike implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
use Dispatchable;
|
||||
use InteractsWithQueue;
|
||||
use Queueable;
|
||||
use SerializesModels;
|
||||
|
||||
/** @var Like */
|
||||
protected $like;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param \App\Models\Like $like
|
||||
* @param Like $like
|
||||
*/
|
||||
public function __construct(Like $like)
|
||||
{
|
||||
|
@ -36,14 +42,18 @@ class ProcessLike implements ShouldQueue
|
|||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @param \GuzzleHttp\Client $client
|
||||
* @param \Jonnybarnes\WebmentionsParser\Authorship $authorship
|
||||
* @param Client $client
|
||||
* @param Authorship $authorship
|
||||
* @return int
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function handle(Client $client, Authorship $authorship): int
|
||||
{
|
||||
if ($this->isTweet($this->like->url)) {
|
||||
$tweet = Twitter::getOembed(['url' => $this->like->url]);
|
||||
$codebird = resolve(Codebird::class);
|
||||
|
||||
$tweet = $codebird->statuses_oembed(['url' => $this->like->url]);
|
||||
|
||||
$this->like->author_name = $tweet->author_name;
|
||||
$this->like->author_url = $tweet->author_url;
|
||||
$this->like->content = $tweet->html;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue