Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(polls): Updates polls validation.

damencho66f7b9de5353
diff --git a/resources/prosody-plugins/mod_polls_component.lua b/resources/prosody-plugins/mod_polls_component.lua
index 2bb8383eaa..a21d3c4a56 100644
--- a/resources/prosody-plugins/mod_polls_component.lua
+++ b/resources/prosody-plugins/mod_polls_component.lua
@@ -53,7 +53,7 @@ local function validate_polls(data)
if data.command ~= 'new-poll' and data.command ~= 'answer-poll' then
return false;
end
- if type(data.answers) ~= 'table' then
+ if type(data.answers) ~= 'table' or #data.answers == 0 then
return false;
end