@SychO , do you think the following code will fix the issue:
return $this->cache->remember('afrux-online-users-widget.users', 40, function () use ($actor, $time, $limit) {
return User::query()
->select('id', 'preferences')
->whereVisibleTo($actor)
->where('last_seen_at', '>', $time)
->limit($limit + 1)
->get()
->filter(function ($user, $actor) {
return (bool)$actor->hasPermission('user.viewLastSeenAt') or (bool)$user->getPreference('discloseOnline');
})
->pluck('id')
->toArray();
}) ?: [];
}
How can I test it easily? I checked out your code and put that change in a branch but I can't push it to the remote repository, I guess I have to be granted permissions. What's the easiest way for me to test that change without installing PHP, etc. on my computer? If I directly find that PHP file on my hosting server and edit it to include that change, will it work?