Skip to content

Commit

Permalink
Update PublicApiController, remove expensive and unused relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Oct 7, 2022
1 parent fefcbae commit 2ecc314
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions app/Http/Controllers/PublicApiController.php
Expand Up @@ -364,7 +364,6 @@ public function publicTimelineApi(Request $request)
)
->whereNull(['in_reply_to_id', 'reblog_of_id'])
->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
->with('profile', 'hashtags', 'mentions')
->whereLocal(true)
->whereScope('public')
->orderBy('id', 'desc')
Expand Down Expand Up @@ -517,7 +516,6 @@ public function homeTimelineApi(Request $request)
->when($textOnlyReplies != true, function($q, $textOnlyReplies) {
return $q->whereNull('in_reply_to_id');
})
->with('profile', 'hashtags', 'mentions')
->where('id', $dir, $id)
->whereIn('profile_id', $following)
->whereIn('visibility',['public', 'unlisted', 'private'])
Expand Down Expand Up @@ -564,7 +562,6 @@ public function homeTimelineApi(Request $request)
->when(!$textOnlyReplies, function($q, $textOnlyReplies) {
return $q->whereNull('in_reply_to_id');
})
->with('profile', 'hashtags', 'mentions')
->whereIn('profile_id', $following)
->whereIn('visibility',['public', 'unlisted', 'private'])
->orderBy('created_at', 'desc')
Expand Down

0 comments on commit 2ecc314

Please sign in to comment.