notes from meeting
This commit is contained in:
parent
1d45dc38b0
commit
08151ad9d9
@ -60,16 +60,37 @@ function JoinOrg:initiate(result)
|
|||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
for user in pairs(self.org.users) {
|
||||||
|
self.org:add_pending_action(self.id, user, "callback")
|
||||||
|
|
||||||
|
|
||||||
|
org.pending.user[2348] = "callback"
|
||||||
|
|
||||||
|
self:callback(user)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if result then result() end
|
if result then result() end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function JoinOrg:request()
|
function JoinOrg:callback(user)
|
||||||
|
modpol.interactions.binary_poll_user(
|
||||||
|
self.initiator,
|
||||||
|
"Do you want this" .. self.user_to_add .. "to join?",
|
||||||
|
function (resp)
|
||||||
|
if resp == "yes" then
|
||||||
|
self.votes_yes += 1
|
||||||
|
end
|
||||||
|
|
||||||
|
self:evaluate_vote()
|
||||||
|
|
||||||
|
end
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function JoinOrg:on_success()
|
function JoinOrg:on_success()
|
||||||
self.org:add_member(self.initiator)
|
self.org:add_member(self.initiator)
|
||||||
self.org:delete_process(self.id)
|
self.org:delete_process(self.id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user