Explorar o código

Update AP helpers, fix last_fetched_at condition

Daniel Supernault %!s(int64=3) %!d(string=hai) anos
pai
achega
c32bb55b8a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Util/ActivityPub/Helpers.php

+ 1 - 1
app/Util/ActivityPub/Helpers.php

@@ -695,7 +695,7 @@ class Helpers {
 		}
 
 		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 $profile;