Make progressive achievements get notifications when complete
This commit is contained in:
@@ -98,7 +98,8 @@ class AchievementService
|
||||
->where('achievement_id', $achievement->id)
|
||||
->first();
|
||||
|
||||
$alreadyUnlocked = $existing !== null;
|
||||
$alreadyUnlocked = $existing !== null
|
||||
&& (! $achievement->progressive || $existing->progress >= $achievement->threshold);
|
||||
|
||||
UserAchievement::updateOrCreate(
|
||||
['user_id' => $user->id, 'achievement_id' => $achievement->id],
|
||||
|
||||
Reference in New Issue
Block a user