From 7641a7c1aead2c9b424dda6de684b482817647f8 Mon Sep 17 00:00:00 2001 From: Emad Adel <19177373+emadadel4@users.noreply.github.com> Date: Fri, 22 Nov 2024 03:34:46 +0200 Subject: [PATCH] Update Startup-Log.ps1 --- scripts/Core/Startup-Log.ps1 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/Core/Startup-Log.ps1 b/scripts/Core/Startup-Log.ps1 index 31f43f7b..8843e7a3 100644 --- a/scripts/Core/Startup-Log.ps1 +++ b/scripts/Core/Startup-Log.ps1 @@ -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