Resolved merge conflicts with master
This commit is contained in:
@ -2,9 +2,9 @@
|
||||
-- @module consent
|
||||
|
||||
local consent = {
|
||||
name = "Consent process utility",
|
||||
name = "Consent process",
|
||||
slug = "consent",
|
||||
desc = "A module other modules use for consent decisions",
|
||||
desc = "A utility module other modules use for consent decisions",
|
||||
hide = true
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ function consent:initiate(result)
|
||||
if self.org:get_member_count() == 0 then
|
||||
if self.data.result then
|
||||
self.data.result() end
|
||||
self.org:wipe_pending_actions(self.id)
|
||||
self.org:delete_process(self.id)
|
||||
else
|
||||
-- otherwise, create poll
|
||||
for id, member in pairs(self.org.members) do
|
||||
@ -47,14 +47,19 @@ function consent:callback(member)
|
||||
if resp == "Yes" then
|
||||
self.data.votes = self.data.votes + 1
|
||||
end
|
||||
modpol.interactions.message_org(
|
||||
"consent", self.org.id,
|
||||
member.." decided "..resp.." on: "..
|
||||
self.config.prompt.." ("..self.data.votes..
|
||||
"/"..self.config.votes_required..")"
|
||||
)
|
||||
if self.data.votes >= self.config.votes_required then
|
||||
if self.data.result then
|
||||
self.data.result() end
|
||||
self.org:wipe_pending_actions(self.id)
|
||||
self.org:delete_process(self.id)
|
||||
end
|
||||
modpol.interactions.org_dashboard(
|
||||
member, self.org.name)
|
||||
member, self.org.id)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
Reference in New Issue
Block a user