make polls not work when they're disabled

This commit is contained in:
Lili (Tlapka) 2025-12-14 19:42:34 +01:00
parent 924c4c547f
commit a52db9f6ae

View File

@ -59,7 +59,8 @@ def owncast_webhook() -> Any | None:
if data["eventData"]["user"]["authenticated"]: if data["eventData"]["user"]["authenticated"]:
remove_duplicate_usernames(db, user_id, display_name) remove_duplicate_usernames(db, user_id, display_name)
elif data["eventData"]["rawBody"].startswith(f"{prefix}vote"): 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): elif data["eventData"]["rawBody"].startswith(prefix):
handle_redeem(data["eventData"]["rawBody"], user_id) handle_redeem(data["eventData"]["rawBody"], user_id)
return data return data