Skip to content

Commit

Permalink
fix: new webmention format can be a string for targetpage
Browse files Browse the repository at this point in the history
fixes #68
  • Loading branch information
mauricerenck committed Sep 2, 2024
1 parent c20b032 commit a3714ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/receiveKomment.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ class KommentReceiver
{
public function storeData(array $newEntry, $targetPage)
{

if(is_string($targetPage)) {
$targetPage = page($targetPage);
}

$fieldData = $targetPage->kommentsInbox()->yaml();
$fieldData[] = $newEntry;
$fieldData = yaml::encode($fieldData);
Expand Down

0 comments on commit a3714ea

Please sign in to comment.