Quellcode durchsuchen

Update AP helpers, fix last_fetched_at condition

Daniel Supernault vor 3 Jahren
Ursprung
Commit
c32bb55b8a
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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;