equal
deleted
inserted
replaced
61 end, allow_contact_invites and "local_user" or "admin")); |
61 end, allow_contact_invites and "local_user" or "admin")); |
62 |
62 |
63 -- This is an admin-only command that creates a new invitation suitable for registering |
63 -- This is an admin-only command that creates a new invitation suitable for registering |
64 -- a new account. It does not add the new user to the admin's roster. |
64 -- a new account. It does not add the new user to the admin's roster. |
65 module:provides("adhoc", new_adhoc("Create new account invite", "urn:xmpp:invite#create-account", |
65 module:provides("adhoc", new_adhoc("Create new account invite", "urn:xmpp:invite#create-account", |
66 function () |
66 function (_, data) |
67 local invite = invites.create_account(); |
67 local invite = invites.create_account(nil, { |
|
68 source = data.from |
|
69 }); |
68 --TODO: check errors |
70 --TODO: check errors |
69 return { |
71 return { |
70 status = "completed"; |
72 status = "completed"; |
71 form = { |
73 form = { |
72 layout = invite_result_form; |
74 layout = invite_result_form; |