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): Returns an error on duplicate poll.

damencho6bb984acc80e
diff --git a/resources/prosody-plugins/mod_polls.lua b/resources/prosody-plugins/mod_polls.lua
index dec9f79462..f8fca17d71 100644
--- a/resources/prosody-plugins/mod_polls.lua
+++ b/resources/prosody-plugins/mod_polls.lua
@@ -115,7 +115,8 @@ module:hook("message/bare", function(event)
if room.polls.by_id[data.pollId] ~= nil then
module:log("error", "Poll already exists: %s", data.pollId);
- return;
+ event.origin.send(st.error_reply(event.stanza, 'cancel', 'not-allowed', 'Poll already exists'));
+ return true;
end
local answers = {}