From 78d2c5a03f4ccdd7f1c7238091f2b21b76344d62 Mon Sep 17 00:00:00 2001 From: Logan Fick Date: Sat, 5 Apr 2025 17:05:13 -0400 Subject: [PATCH] Fixed notifications containing extra blank line for streams with no tags. (Closes #4) --- owncastsentry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/owncastsentry.py b/owncastsentry.py index 36c272a..40263f6 100644 --- a/owncastsentry.py +++ b/owncastsentry.py @@ -300,8 +300,9 @@ class OwncastSentry(Plugin): body_text += "\n\nTo tune in, visit: https://" + domain + "/\n\n" - for tag in stream_config["tags"]: - body_text += "#" + tag + " " + if "tags" in stream_config and len(stream_config["tags"]) > 0: + body_text += "\n\n" + body_text += " ".join("#" + tag for tag in stream_config["tags"]) # Iterate over the subscribed rooms and try to send a message to each. # TODO: This should probably be made async.