Remove availability when not scheduled

This commit is contained in:
Matteo Gheza 2023-03-16 00:40:53 +01:00
parent b1e64f2993
commit 4e265b8ade
1 changed files with 7 additions and 0 deletions

View File

@ -44,5 +44,12 @@ class UpdateAvailabilityWithSchedulesJob implements ShouldQueue
["availability_manual_mode", "=", 0]
])
->update(['available' => 1]);
User::whereNotIn("id", $scheduled_users)
->where([
["banned", "=", 0],
["availability_manual_mode", "=", 0]
])
->update(['available' => 0]);
}
}