This commit is contained in:
isUnknown 2024-10-23 15:49:09 +02:00
parent ea48094bc7
commit b99f7c81dd

View file

@ -16,11 +16,13 @@ return [
$comments = $file->comments()->isEmpty() == true ? [] : Data::decode($file->comments()->toArray()['comments'], 'yaml');
$comments[$data->targetPage][$data->id] = [
$newComment = [
'text' => $data->text,
'username' => $user->name()->isNotEmpty() ? (string) $user->name() : (string) $user->email(),
'date' => (string) $data->date,
];
$comments[$data->targetPage][$data->id] = $newComment;
$newFile = $file->update([