From a52db9f6aea07a898c906214689dde60aab457cf Mon Sep 17 00:00:00 2001 From: Lili Date: Sun, 14 Dec 2025 19:42:34 +0100 Subject: [PATCH] make polls not work when they're disabled --- tlapbot/owncast_webhooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tlapbot/owncast_webhooks.py b/tlapbot/owncast_webhooks.py index 30bbf03..4d90caa 100644 --- a/tlapbot/owncast_webhooks.py +++ b/tlapbot/owncast_webhooks.py @@ -59,7 +59,8 @@ def owncast_webhook() -> Any | None: if data["eventData"]["user"]["authenticated"]: remove_duplicate_usernames(db, user_id, display_name) elif data["eventData"]["rawBody"].startswith(f"{prefix}vote"): - handle_poll_vote(data["eventData"]["rawBody"], user_id) + if current_app.config['POLLS_ENABLED']: + handle_poll_vote(data["eventData"]["rawBody"], user_id) elif data["eventData"]["rawBody"].startswith(prefix): handle_redeem(data["eventData"]["rawBody"], user_id) return data