added some notes to the modules, some not currently functional. rewriting process.lua to work with new modules, support pending actions

This commit is contained in:
Luke Miller
2021-11-29 14:36:18 -05:00
parent db43df6ce2
commit f381845d21
6 changed files with 226 additions and 160 deletions

View File

@@ -23,11 +23,44 @@ function JoinOrg:initiate(result)
"Would you like to join",
function (resp)
if resp == "Yes" then
self:implement()
modpol.call_module(
"consent",
"",
org,
result
)
modpol.modules.consent(
"Let " .. initiator .. " join " .. org.name .. "?",
org,
params,
self:on_failure,
self:on_success
)
-- for i, member in ipairs(org.members) do
-- org:add_pending_action(
-- member,
-- function ()
-- modpol.interactions.binary_poll_user(
-- member,
-- "Let " .. initiator .. " join " .. org.name .. "?",
-- function (resp)
-- self:vote()
-- end
-- )
-- end
-- )
-- end
end
end
)
if result then result() end
end
@@ -36,7 +69,7 @@ function JoinOrg:request()
end
function JoinOrg:implement()
function JoinOrg:on_success()
self.org:add_member(self.initiator)
end