Mercurial > prosody-modules
diff 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 |
line wrap: on
line diff
--- a/mod_invites_adhoc/mod_invites_adhoc.lua Tue Jan 26 16:05:49 2021 +0100 +++ b/mod_invites_adhoc/mod_invites_adhoc.lua Tue Jan 26 16:09:02 2021 +0100 @@ -63,8 +63,10 @@ -- This is an admin-only command that creates a new invitation suitable for registering -- a new account. It does not add the new user to the admin's roster. module:provides("adhoc", new_adhoc("Create new account invite", "urn:xmpp:invite#create-account", - function () - local invite = invites.create_account(); + function (_, data) + local invite = invites.create_account(nil, { + source = data.from + }); --TODO: check errors return { status = "completed";