소스 검색

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;