Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ jobs:


build-project:
if: github.event.pull_request.merged == true
#if: github.event.pull_request.merged == true
name: Build dotNet
strategy:
matrix:
dotnet-version: [ '9.x' ]
dotnet-version: [ '10.x' ]
kind: [ 'amd64', 'arm64', 'armv7' ]
include:
- kind: amd64
Expand Down
3 changes: 2 additions & 1 deletion Models/DeviceModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using iGotify_Notification_Assist.Services;
using Newtonsoft.Json;
using SecNtfyNuGet;
using Websocket.Client;
using Environments = iGotify_Notification_Assist.Services.Environments;
Expand Down Expand Up @@ -59,6 +60,6 @@ public async Task SendNotifications(GotifyMessage iGotifyMessage, WebsocketClien
var ntfy = new SecNtfy(Environments.secNtfyUrl);
var response = await ntfy.SendNotification(usr.DeviceToken, title, msg, iGotifyMessage.priority == 10, imageUrl,
iGotifyMessage.priority);
Console.WriteLine(response);
Console.WriteLine(response != null ? JsonConvert.SerializeObject(response) : "Notification response is null");
}
}
8 changes: 4 additions & 4 deletions Services/GotifySocketService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public async void Start()
var statusNtfyList = secntfyTokenList.Count == 0 ? "empty" : "filled";
Console.WriteLine($"SecNtfy Token list is: {statusNtfyList}");
Console.WriteLine(
$"If one or more lists are empty please check the environment variable! GOTIFY_SERVERS or GOTIFY_CLIENTS or NTFY_TOKENS");
$"If one or more lists are empty please check the environment variable! GOTIFY_URLS or GOTIFY_CLIENT_TOKENS or SECNTFY_TOKENS");
Console.WriteLine(
$"If all lists are empty do nothing, you will configure the gotify server over the iGotify app.");
}
Expand All @@ -271,15 +271,15 @@ public async void Start()
StartConnection(userList, secntfyUrl);
}

private void StartConnection(List<Users> userList, string secntfyUrl)
private async void StartConnection(List<Users> userList, string secntfyUrl)
{
foreach (var user in userList)
{
string isGotifyAvailable;
string isSecNtfyAvailable;
try
{
isGotifyAvailable = SecNtfy.CheckIfUrlReachable(user.GotifyUrl) ? "yes" : "no";
isGotifyAvailable = await SecNtfy.CheckIfUrlReachable(user.GotifyUrl) ? "yes" : "no";

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

try
{
bool isSecNtfyAvailableBool = SecNtfy.CheckIfUrlReachable(secntfyUrl);
bool isSecNtfyAvailableBool = await SecNtfy.CheckIfUrlReachable(secntfyUrl);
isSecNtfyAvailable = isSecNtfyAvailableBool ? "yes" : "no";

if (!isSecNtfyAvailableBool)
Expand Down
14 changes: 7 additions & 7 deletions iGotify Notification Assist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<RootNamespace>iGotify_Notification_Assist</RootNamespace>
<AssemblyVersion>1.5.1.2</AssemblyVersion>
<FileVersion>1.5.1.2</FileVersion>
<Version>1.5.1.2</Version>
<AssemblyVersion>1.5.1.3</AssemblyVersion>
<FileVersion>1.5.1.3</FileVersion>
<Version>1.5.1.3</Version>
<LangVersion>default</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.66" />
<PackageReference Include="Dapper.Contrib" Version="2.0.78" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.1" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="Scalar.AspNetCore" Version="2.11.0" />
<PackageReference Include="secntfy.nuget" Version="1.0.5" />
<PackageReference Include="Scalar.AspNetCore" Version="2.11.10" />
<PackageReference Include="secntfy.nuget" Version="1.0.9" />
<PackageReference Include="Websocket.Client" Version="5.3.0" />
</ItemGroup>

Expand Down
Loading