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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user