The Polls feature recently landed in the master branch and it’s awesome. As of now, Both moderator and non-moderator can create a poll but it would be great if it’s possible to restrict this functionality to moderator only.
for some reason, it’s not working for me (prosody don’t start saying that muc should be loaded as component). I had to do:
--- mod_polls.lua.old 2021-08-17 10:07:08.603800613 +0200
+++ mod_polls.lua 2021-08-17 09:35:19.492103033 +0200
@@ -6,7 +6,7 @@
local st = require("util.stanza");
local util = module:require("util");
-local muc = module:depends("muc");
+local get_room_from_jid = module:require "util".get_room_from_jid;
local is_healthcheck_room = util.is_healthcheck_room;
@@ -57,7 +57,7 @@
local data = get_poll_message(event.stanza);
if data == nil then return end
- local room = muc.get_room_from_jid(event.stanza.attr.to);
+ local room = get_room_from_jid(event.stanza.attr.to);
if data.type == "new-poll" then
if check_polls(room) then return end
This is with unstable and Ubuntu 20.04 LTS with its original Prosody version. Maybe it’s coming from me having installed the thing quite some time ago and not doing all necessary config updates.
Another possibility for update trouble is not having the prosody module loaded, the UI is available but polls are not - quite logically - seen from an user to another.
And well, about your question it does not seem possible yet and sites where users are unruly should disable the feature in the UI. Rome was not built in a day and so on.
by the way… is it possible only for moderators (logged in through jwt) to only start polls and see result of polls? Other users who are non-moderators should only be able to respond to polls and not see poll results.
I am sure there must be a way …no?
i.e. if moderators can only kickout other participants, then there must be a way for only moderators to start and see poll results
This has been brought up a few times before, but I don’t think it’s on the priority list (I’m not even sure it’s on the roadmap at all). A ticket was opened sometime back to request it as a feature: