comparison mod_invites_adhoc/mod_invites_adhoc.lua @ 4395:df9bb3d861f9

mod_invites_adhoc: add information about who created an invitation
author Jonas Schäfer <jonas@wielicki.name>
date Tue, 26 Jan 2021 16:09:02 +0100
parents 2b6918714792
children 6e0aa163298f
comparison
equal deleted inserted replaced
4394:32f1f18f4874 4395:df9bb3d861f9
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;