From 47aa51a58c15f06bd2fa259d4767261d330029c9 Mon Sep 17 00:00:00 2001 From: damencho Date: Mon, 29 Dec 2025 11:39:28 -0600 Subject: [PATCH] fix(polls): Drops not needed check. --- resources/prosody-plugins/mod_polls_component.lua | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/resources/prosody-plugins/mod_polls_component.lua b/resources/prosody-plugins/mod_polls_component.lua index a21d3c4a56..1cdb856c8a 100644 --- a/resources/prosody-plugins/mod_polls_component.lua +++ b/resources/prosody-plugins/mod_polls_component.lua @@ -33,15 +33,6 @@ local main_domain = module:get_option_string('main_domain'); -- only the visitor prosody has main_domain setting local is_visitor_prosody = main_domain ~= nil; --- Logs a warning and returns true if a room does not --- have poll data associated with it. -local function check_polls(room) - if room.polls == nil then - module:log("warn", "no polls data in room"); - return true; - end - return false; -end local function validate_polls(data) if type(data) ~= 'table' then @@ -222,8 +213,6 @@ end return true; end - if check_polls(room) then return end - local poll_creator = occupant_details; if room.polls.count >= POLLS_LIMIT then @@ -286,8 +275,6 @@ end module:context(jid.host(room.jid)):fire_event('poll-created', pollData); elseif data.command == "answer-poll" then - if check_polls(room) then return end - local poll = room.polls.by_id[data.pollId]; if poll == nil then module:log("warn", "answering inexistent poll %s", data.pollId);