|
|
@ -22,6 +22,23 @@ class CreateNote extends Fractal\TransformerAbstract
|
|
|
|
'name' => $name
|
|
|
|
'name' => $name
|
|
|
|
];
|
|
|
|
];
|
|
|
|
})->toArray();
|
|
|
|
})->toArray();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($status->in_reply_to_id != null) {
|
|
|
|
|
|
|
|
$parent = $status->parent()->profile;
|
|
|
|
|
|
|
|
if($parent) {
|
|
|
|
|
|
|
|
$webfinger = $parent->emailUrl();
|
|
|
|
|
|
|
|
$name = Str::startsWith($webfinger, '@') ?
|
|
|
|
|
|
|
|
$webfinger :
|
|
|
|
|
|
|
|
'@' . $webfinger;
|
|
|
|
|
|
|
|
$reply = [
|
|
|
|
|
|
|
|
'type' => 'Mention',
|
|
|
|
|
|
|
|
'href' => $parent->permalink(),
|
|
|
|
|
|
|
|
'name' => $name
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
$mentions = array_merge($reply, $mentions);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$hashtags = $status->hashtags->map(function ($hashtag) {
|
|
|
|
$hashtags = $status->hashtags->map(function ($hashtag) {
|
|
|
|
return [
|
|
|
|
return [
|
|
|
|
'type' => 'Hashtag',
|
|
|
|
'type' => 'Hashtag',
|
|
|
|