瀏覽代碼

Update AP helpers, fix last_fetched_at condition

Daniel Supernault 3 年之前
父節點
當前提交
c32bb55b8a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;