basic interaction dashboard, interact callback function in consent module
This commit is contained in:
@@ -38,6 +38,16 @@ function modpol.modules.consent:new_process(id, request_id, org_id)
|
||||
return process
|
||||
end
|
||||
|
||||
-- ============================
|
||||
-- interact function for the consent module
|
||||
function modpol.modules.consent:interact(user)
|
||||
local resp = modpol.interactions.binary_poll_user(user, "How do you vote?")
|
||||
if resp == 'yes' then
|
||||
self:approve(user, true)
|
||||
elseif resp == 'no' then
|
||||
self:approve(user, false)
|
||||
end
|
||||
end
|
||||
|
||||
-- =========================================
|
||||
-- function to delete a process, called when process finishes
|
||||
|
Reference in New Issue
Block a user