mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-30 19:03:21 +00:00
Update StatusHashtagService
This commit is contained in:
parent
7262ca5f0d
commit
623e0c9adb
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,7 @@ class StatusHashtagService {
|
||||||
public static function get($id, $page = 1, $stop = 9)
|
public static function get($id, $page = 1, $stop = 9)
|
||||||
{
|
{
|
||||||
return StatusHashtag::whereHashtagId($id)
|
return StatusHashtag::whereHashtagId($id)
|
||||||
|
->whereStatusVisibility('public')
|
||||||
->whereHas('media')
|
->whereHas('media')
|
||||||
->skip($stop)
|
->skip($stop)
|
||||||
->latest()
|
->latest()
|
||||||
|
@ -31,6 +32,7 @@ class StatusHashtagService {
|
||||||
{
|
{
|
||||||
$stop = $stop > 2000 ? 2000 : $stop;
|
$stop = $stop > 2000 ? 2000 : $stop;
|
||||||
$ids = StatusHashtag::whereHashtagId($id)
|
$ids = StatusHashtag::whereHashtagId($id)
|
||||||
|
->whereStatusVisibility('public')
|
||||||
->whereHas('media')
|
->whereHas('media')
|
||||||
->latest()
|
->latest()
|
||||||
->skip($start)
|
->skip($start)
|
||||||
|
@ -65,6 +67,7 @@ class StatusHashtagService {
|
||||||
{
|
{
|
||||||
return Cache::remember('pf:services:status-hashtag:post:'.$statusId.':hashtag:'.$hashtagId, now()->addMonths(3), function() use($statusId, $hashtagId) {
|
return Cache::remember('pf:services:status-hashtag:post:'.$statusId.':hashtag:'.$hashtagId, now()->addMonths(3), function() use($statusId, $hashtagId) {
|
||||||
$statusHashtag = StatusHashtag::with('profile', 'status', 'hashtag')
|
$statusHashtag = StatusHashtag::with('profile', 'status', 'hashtag')
|
||||||
|
->whereStatusVisibility('public')
|
||||||
->whereStatusId($statusId)
|
->whereStatusId($statusId)
|
||||||
->whereHashtagId($hashtagId)
|
->whereHashtagId($hashtagId)
|
||||||
->first();
|
->first();
|
||||||
|
|
Loading…
Reference in a new issue