working version of join_org module demonstrated in tests/new_module_test.lua
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
|
||||
join_org = {}
|
||||
|
||||
function join_org.initiate(initiator, org, result)
|
||||
modpol.interactions.binary_poll_user(
|
||||
initiator,
|
||||
"Would you like to join " .. org.name,
|
||||
function (resp)
|
||||
if resp == "Yes" then
|
||||
org:add_member(initiator)
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
if result then result() end
|
||||
end
|
||||
|
||||
modpol.modules.join_org = join_org
|
||||
|
||||
Reference in New Issue
Block a user