1
0
Fork 0
forked from mirror/pixelfed

Update AP helpers, fix last_fetched_at condition

This commit is contained in:
Daniel Supernault 2022-06-20 21:48:37 -06:00
parent 9ef9985133
commit c32bb55b8a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -695,7 +695,7 @@ class Helpers {
} }
if($profile = Profile::whereRemoteUrl($url)->first()) { if($profile = Profile::whereRemoteUrl($url)->first()) {
if($profile->last_fetched_at->lt(now()->subHours(24))) { if($profile->last_fetched_at && $profile->last_fetched_at->lt(now()->subHours(24))) {
return self::profileUpdateOrCreate($url); return self::profileUpdateOrCreate($url);
} }
return $profile; return $profile;