From 53b68a19300585adb806fdbb6562bfc9cda80e0b Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Tue, 27 Aug 2024 18:37:48 +0100 Subject: [PATCH] correct uptime kuma msg --- norg/notifier/uptimekuma_notifier.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/norg/notifier/uptimekuma_notifier.nim b/norg/notifier/uptimekuma_notifier.nim index 8b9f8f2..751ef3d 100644 --- a/norg/notifier/uptimekuma_notifier.nim +++ b/norg/notifier/uptimekuma_notifier.nim @@ -14,7 +14,9 @@ proc send_notify*(uk: UptimeKuma, state: State, runtime: int = 0, msg: string = status = "up" else: status = "down" - let message = fmt"{status}:{msg}" + var message = fmt"{status}" + if msg != "": + message &= fmt":{msg}" let url = fmt"{uk.base_url}?status={status}&msg={message}&ping={runtime}" echo "Sending notification to " & url