1
0
Fork 0
forked from mirror/pixelfed

Merge pull request #4656 from pixelfed/staging

Update NotificationService, fix order bug
This commit is contained in:
daniel 2023-09-18 00:25:28 -06:00 committed by GitHub
commit 5a9a159708
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,6 +58,7 @@ class NotificationService {
$stop = $stop > 400 ? 400 : $stop;
$ids = Notification::where('id', '>', self::getEpochId())
->where('profile_id', $id)
->orderByDesc('id')
->skip($start)
->take($stop)
->pluck('id');
@ -281,6 +282,7 @@ class NotificationService {
if(self::count($id) == 0 || $force == true) {
$ids = Notification::where('profile_id', $id)
->where('id', '>', self::getEpochId())
->orderByDesc('id')
->limit($stop)
->pluck('id');
foreach($ids as $key) {