Skip to content

Commit

Permalink
Update Startup-Log.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
emadadel4 committed Nov 22, 2024
1 parent e3fed05 commit 7641a7c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/Core/Startup-Log.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,14 @@ function Startup {
$existingData = Invoke-RestMethod -Uri $firebaseUrlWithKey -Method Get -ErrorAction SilentlyContinue

# Determine run count and message
if ($existingData) {
$Runs = $existingData.Runs + 1
Telegram -Message "💻 '$env:USERNAME' has opened ITT again."
} else {
$Runs = 1
if (-not $existingData) {
Telegram -Message "🎉 A new device 👤 '$env:USERNAME' is now running ITT!"
$Runs = 1
}
else
{
Telegram -Message "💻 '$env:USERNAME' has opened ITT again."
$Runs = $existingData.Runs + 1
}

# Update Firebase with the new run count
Expand Down

0 comments on commit 7641a7c

Please sign in to comment.