Webmentions were being saved with wrong model relationship

Fix the process webmention job to use the correct model relationship,
add an artisan command to update existing webmentions in the database to
use the correct model relationship.
This commit is contained in:
Jonny Barnes 2024-03-22 17:43:23 +00:00
parent 8b276938e9
commit 12d3da5fdb
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
2 changed files with 37 additions and 1 deletions

View file

@ -92,7 +92,7 @@ class ProcessWebMention implements ShouldQueue
$webmention->source = $this->source;
$webmention->target = $this->note->longurl;
$webmention->commentable_id = $this->note->id;
$webmention->commentable_type = 'App\Model\Note';
$webmention->commentable_type = Note::class;
$webmention->type = $type;
$webmention->mf2 = json_encode($microformats);
$webmention->save();