From b20a2bc9aec228c8cd57c73f0df28bb69c7478d6 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 8 Sep 2019 21:35:45 -0600 Subject: [PATCH] Update AP Helpers --- app/Util/ActivityPub/Helpers.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index 46729891..a70d828d 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -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);