Skip to content

Commit

Permalink
Changed ImageUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
androidseb25 committed Jun 12, 2024
1 parent 6d33197 commit b6a8947
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Models/DeviceModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ public async Task SendNotifications(GotifyMessage iGotifyMessage, WebsocketClien
{
var title = iGotifyMessage.title;
var msg = iGotifyMessage.message;
var imageUrl = $"{webSock.Url.ToString()}$$${iGotifyMessage.appid}$$${webSock.Name}";

var protocol = webSock.Url.ToString().Contains("ws://") ? "http://" : "https://";
var gotifyServerUrl = webSock.Url.ToString().Replace("ws://", "").Replace("wss://", "").Replace("\"", "").Split("/stream");
var imageUrl = gotifyServerUrl.Length > 0 ? $"{protocol}{gotifyServerUrl[0]}$$${iGotifyMessage.appid}$$${webSock.Name}" : "";

var usr = await DatabaseService.GetUser(webSock.Name!);

Expand Down

0 comments on commit b6a8947

Please sign in to comment.