Fixed notifications containing extra blank line for streams with no tags. (Closes #4)
Some checks failed
Build Maubot Plugin Artifact / Build (push) Successful in 3s
Lint Source Code / Lint (push) Failing after 8s

This commit is contained in:
2025-04-05 17:05:13 -04:00
parent aad810d710
commit 78d2c5a03f

View File

@@ -300,8 +300,9 @@ class OwncastSentry(Plugin):
body_text += "\n\nTo tune in, visit: https://" + domain + "/\n\n" body_text += "\n\nTo tune in, visit: https://" + domain + "/\n\n"
for tag in stream_config["tags"]: if "tags" in stream_config and len(stream_config["tags"]) > 0:
body_text += "#" + tag + " " 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. # Iterate over the subscribed rooms and try to send a message to each.
# TODO: This should probably be made async. # TODO: This should probably be made async.