Update AP Helpers

This commit is contained in:
Daniel Supernault 2019-09-08 21:35:45 -06:00
parent cfbaca78b4
commit b20a2bc9ae
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -220,7 +220,7 @@ class Helpers {
$id = (int) last(explode('/', $url));
return Status::findOrFail($id);
} else {
$cached = Status::whereUri($url)->orWhere('url', $url)->first();
$cached = Status::whereUri($url)->orWhere('object_url', $url)->first();
if($cached) {
return $cached;
}
@ -317,6 +317,7 @@ class Helpers {
$status->profile_id = $profile->id;
$status->url = isset($res['url']) ? $res['url'] : $url;
$status->uri = isset($res['url']) ? $res['url'] : $url;
$status->object_url = isset($res['id']) ? $res['id'] : $url;
$status->caption = strip_tags($res['content']);
$status->rendered = Purify::clean($res['content']);
$status->created_at = Carbon::parse($ts);