소스 검색

Update StatusTransformers, fix ProfileService to soft fail on missing or deleted accounts

Daniel Supernault 2 년 전
부모
커밋
43d3aa2b94
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      app/Transformer/Api/Mastodon/v1/StatusTransformer.php
  2. 1 1
      app/Transformer/Api/StatusTransformer.php

+ 1 - 1
app/Transformer/Api/Mastodon/v1/StatusTransformer.php

@@ -42,7 +42,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
 			'card'                      => null,
 			'poll'                      => null,
 			'media_attachments'         => MediaService::get($status->id),
-			'account'                   => ProfileService::get($status->profile_id),
+			'account'                   => ProfileService::get($status->profile_id, true),
 			'tags'                      => StatusHashtagService::statusTags($status->id),
 		];
 	}

+ 1 - 1
app/Transformer/Api/StatusTransformer.php

@@ -66,7 +66,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
 			'label'                     => StatusLabelService::get($status),
 			'liked_by'                  => LikeService::likedBy($status),
 			'media_attachments'			=> MediaService::get($status->id),
-			'account'					=> ProfileService::get($status->profile_id),
+			'account'					=> ProfileService::get($status->profile_id, true),
 			'tags'						=> StatusHashtagService::statusTags($status->id),
 			'poll'						=> $poll,
 			'bookmarked'				=> BookmarkService::get($pid, $status->id),