Update ApiV1Controller, add Redis facade

pull/4167/head
Daniel Supernault 2023-02-10 06:14:51 -07:00
rodzic 77721002a4
commit dda9e77024
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -9,6 +9,7 @@ use App\Util\ActivityPub\Helpers;
use App\Util\Media\Filter;
use Laravel\Passport\Passport;
use Auth, Cache, DB, Storage, URL;
use Illuminate\Support\Facades\Redis;
use App\{
Avatar,
Bookmark,

Wyświetl plik

@ -472,9 +472,9 @@ class PublicApiController extends Controller
// $types = ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album', 'text'];
$textOnlyReplies = false;
$textOnlyReplies = (bool) Redis::zscore('pf:tl:replies', $pid);
if(config('exp.top')) {
$textOnlyReplies = (bool) Redis::zscore('pf:tl:replies', $pid);
$textOnlyPosts = (bool) Redis::zscore('pf:tl:top', $pid);
if($textOnlyPosts) {