the browser-facing portion of osu!
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

always exclude no_profile from lookup

+12 -11
+1
app/Http/Controllers/Users/LookupController.php
··· 41 41 42 42 $users = User::where(fn ($q) => $q->whereIn('user_id', $numericIds)->orWhereIn('username', $stringIds)) 43 43 ->default() 44 + ->withoutNoProfile() 44 45 ->with(UserCompactTransformer::CARD_INCLUDES_PRELOAD); 45 46 46 47 if ($params['exclude_bots'] ?? false) {
+1 -1
app/Libraries/Beatmapset/ChangeBeatmapOwners.php
··· 43 43 44 44 $newUserIds = $this->userIds->diff($currentOwners); 45 45 46 - if (User::whereIn('user_id', $newUserIds->toArray())->default()->withoutBots()->count() !== $newUserIds->count()) { 46 + if (User::whereIn('user_id', $newUserIds->toArray())->default()->withoutBots()->withoutNoProfile()->count() !== $newUserIds->count()) { 47 47 throw new InvariantException('invalid user_id'); 48 48 } 49 49
+10 -10
app/Models/User.php
··· 2032 2032 ]); 2033 2033 } 2034 2034 2035 - public function scopeWithoutBots(Builder $query): Builder 2036 - { 2037 - $groups = app('groups'); 2038 - 2039 - return $query->whereNotIn( 2040 - 'group_id', 2041 - [$groups->byIdentifier('no_profile')->getKey(), $groups->byIdentifier('bot')->getKey()], 2042 - ); 2043 - } 2044 - 2045 2035 public function scopeOnline($query) 2046 2036 { 2047 2037 return $query 2048 2038 ->where('user_allow_viewonline', true) 2049 2039 ->where('user_lastvisit', '>', time() - $GLOBALS['cfg']['osu']['user']['online_window']); 2040 + } 2041 + 2042 + public function scopeWithoutBots(Builder $query): Builder 2043 + { 2044 + return $query->whereNot('group_id', app('groups')->byIdentifier('bot')->getKey()); 2045 + } 2046 + 2047 + public function scopeWithoutNoProfile(Builder $query): Builder 2048 + { 2049 + return $query->whereNot('group_id', app('groups')->byIdentifier('no_profile')->getKey()); 2050 2050 } 2051 2051 2052 2052 public function checkPassword($password)