optimizations

This commit is contained in:
2026-03-28 19:15:39 +01:00
parent 0b25d9570a
commit cab4fbd83e
509 changed files with 1016804 additions and 1605 deletions

View File

@@ -10,6 +10,7 @@ use App\Models\Story;
use App\Models\User;
use App\Models\UserAchievement;
use App\Notifications\AchievementUnlockedNotification;
use App\Services\Activity\UserActivityService;
use App\Services\Posts\PostAchievementService;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Cache;
@@ -89,6 +90,12 @@ class AchievementService
$this->achievementPosts->achievementUnlocked($currentUser, $currentAchievement);
$this->forgetSummaryCache((int) $currentUser->id);
try {
app(UserActivityService::class)->logAchievement((int) $currentUser->id, (int) $currentAchievement->id, [
'name' => (string) $currentAchievement->name,
]);
} catch (\Throwable) {}
return true;
}