File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using DotEnv . Core ;
2+ using Playtesters . API . Extensions ;
23
34namespace Playtesters . API . Services ;
45
@@ -12,6 +13,7 @@ public record NotificationMessage(
1213 string IpAddress ,
1314 string Country ,
1415 string City ,
16+ double HoursPlayed ,
1517 DateTime Timestamp
1618) ;
1719
@@ -46,12 +48,14 @@ public async Task SendAsync(NotificationMessage message)
4648
4749 var content =
4850 $ """
49- 🔔 *New validated access*
51+ 🔔 *New validated access: *
5052 👤 Tester: **{ message . TesterName } **
5153 🌐 IP: `{ message . IpAddress } `
5254 🌍 Country: { message . Country }
5355 🏙️ City: { message . City }
56+ ⏳ Hours played: { message . HoursPlayed . ToHhMmSs ( ) }
5457 ⏰ { message . Timestamp : yyyy-MM-dd HH:mm:ss}
58+
5559 """ ;
5660
5761 try
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ public async Task<Result<ValidateTesterAccessResponse>> ExecuteAsync(
6565 IpAddress : ipAddress ,
6666 Country : location . Country ,
6767 City : location . City ,
68+ HoursPlayed : tester . TotalHoursPlayed ,
6869 Timestamp : accessHistory . CheckedAt
6970 ) ;
7071 await notificationService . SendAsync ( notificationMessage ) ;
You can’t perform that action at this time.
0 commit comments