working version of join_org module demonstrated in tests/new_module_test.lua

This commit is contained in:
Luke Miller
2021-11-22 16:24:44 -05:00
parent 8bc5c5ba4e
commit 0ca04294b7
5 changed files with 74 additions and 8 deletions
+18
View File
@@ -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