1
0
Fork 0
forked from mirror/pixelfed

Improve reblog api performance

This commit is contained in:
Daniel Supernault 2022-03-10 23:38:10 -07:00
parent 3ef6c9fe81
commit b3ef2b2902
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -2238,7 +2238,7 @@ class ApiV1Controller extends Controller
if($status->profile_id !== $user->profile_id) {
if($status->scope == 'private') {
abort_if(!$status->profile->followedBy($user->profile), 403);
abort_if(!FollowerService::follows($user->profile_id, $status->profile_id), 403);
} else {
abort_if(!in_array($status->scope, ['public','unlisted']), 403);
}
@ -2281,7 +2281,7 @@ class ApiV1Controller extends Controller
if($status->profile_id !== $user->profile_id) {
if($status->scope == 'private') {
abort_if(!$status->profile->followedBy($user->profile), 403);
abort_if(!FollowerService::follows($user->profile_id, $status->profile_id), 403);
} else {
abort_if(!in_array($status->scope, ['public','unlisted']), 403);
}