Skip to content

Commit 3b137cd

Browse files
authored
Merge pull request #216 from androidseb25/dev
Updated Lib and Fixes
2 parents 5eefbfd + 2399d3b commit 3b137cd

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
name: Build dotNet
119119
strategy:
120120
matrix:
121-
dotnet-version: [ '9.x' ]
121+
dotnet-version: [ '10.x' ]
122122
kind: [ 'amd64', 'arm64', 'armv7' ]
123123
include:
124124
- kind: amd64

Models/DeviceModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using iGotify_Notification_Assist.Services;
2+
using Newtonsoft.Json;
23
using SecNtfyNuGet;
34
using Websocket.Client;
45
using Environments = iGotify_Notification_Assist.Services.Environments;
@@ -59,6 +60,6 @@ public async Task SendNotifications(GotifyMessage iGotifyMessage, WebsocketClien
5960
var ntfy = new SecNtfy(Environments.secNtfyUrl);
6061
var response = await ntfy.SendNotification(usr.DeviceToken, title, msg, iGotifyMessage.priority == 10, imageUrl,
6162
iGotifyMessage.priority);
62-
Console.WriteLine(response);
63+
Console.WriteLine(response != null ? JsonConvert.SerializeObject(response) : "Notification response is null");
6364
}
6465
}

Services/GotifySocketService.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public async void Start()
261261
var statusNtfyList = secntfyTokenList.Count == 0 ? "empty" : "filled";
262262
Console.WriteLine($"SecNtfy Token list is: {statusNtfyList}");
263263
Console.WriteLine(
264-
$"If one or more lists are empty please check the environment variable! GOTIFY_SERVERS or GOTIFY_CLIENTS or NTFY_TOKENS");
264+
$"If one or more lists are empty please check the environment variable! GOTIFY_URLS or GOTIFY_CLIENT_TOKENS or SECNTFY_TOKENS");
265265
Console.WriteLine(
266266
$"If all lists are empty do nothing, you will configure the gotify server over the iGotify app.");
267267
}
@@ -271,15 +271,15 @@ public async void Start()
271271
StartConnection(userList, secntfyUrl);
272272
}
273273

274-
private void StartConnection(List<Users> userList, string secntfyUrl)
274+
private async void StartConnection(List<Users> userList, string secntfyUrl)
275275
{
276276
foreach (var user in userList)
277277
{
278278
string isGotifyAvailable;
279279
string isSecNtfyAvailable;
280280
try
281281
{
282-
isGotifyAvailable = SecNtfy.CheckIfUrlReachable(user.GotifyUrl) ? "yes" : "no";
282+
isGotifyAvailable = await SecNtfy.CheckIfUrlReachable(user.GotifyUrl) ? "yes" : "no";
283283

284284
if (isGotifyAvailable == "no")
285285
{
@@ -296,7 +296,7 @@ private void StartConnection(List<Users> userList, string secntfyUrl)
296296

297297
try
298298
{
299-
bool isSecNtfyAvailableBool = SecNtfy.CheckIfUrlReachable(secntfyUrl);
299+
bool isSecNtfyAvailableBool = await SecNtfy.CheckIfUrlReachable(secntfyUrl);
300300
isSecNtfyAvailable = isSecNtfyAvailableBool ? "yes" : "no";
301301

302302
if (!isSecNtfyAvailableBool)

iGotify Notification Assist.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<InvariantGlobalization>true</InvariantGlobalization>
88
<RootNamespace>iGotify_Notification_Assist</RootNamespace>
9-
<AssemblyVersion>1.5.1.2</AssemblyVersion>
10-
<FileVersion>1.5.1.2</FileVersion>
11-
<Version>1.5.1.2</Version>
9+
<AssemblyVersion>1.5.1.3</AssemblyVersion>
10+
<FileVersion>1.5.1.3</FileVersion>
11+
<Version>1.5.1.3</Version>
1212
<LangVersion>default</LangVersion>
1313
</PropertyGroup>
1414

1515
<ItemGroup>
1616
<PackageReference Include="Dapper" Version="2.1.66" />
1717
<PackageReference Include="Dapper.Contrib" Version="2.0.78" />
18-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0" />
19-
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.0" />
18+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.1" />
19+
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.1" />
2020
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
21-
<PackageReference Include="Scalar.AspNetCore" Version="2.11.0" />
22-
<PackageReference Include="secntfy.nuget" Version="1.0.5" />
21+
<PackageReference Include="Scalar.AspNetCore" Version="2.11.10" />
22+
<PackageReference Include="secntfy.nuget" Version="1.0.9" />
2323
<PackageReference Include="Websocket.Client" Version="5.3.0" />
2424
</ItemGroup>
2525

0 commit comments

Comments
 (0)