Mercurial > prosody-modules
changeset 4396:de55e1475808
mod_http_admin_api: re-add information about invite creator
It is now the JID of the user + a made up resource indicating
that it was the admin API.
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Tue, 26 Jan 2021 16:10:11 +0100 (2021-01-26) |
parents | df9bb3d861f9 |
children | 6e0aa163298f |
files | mod_http_admin_api/mod_http_admin_api.lua |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_admin_api/mod_http_admin_api.lua Tue Jan 26 16:09:02 2021 +0100 +++ b/mod_http_admin_api/mod_http_admin_api.lua Tue Jan 26 16:10:11 2021 +0100 @@ -120,6 +120,8 @@ options = {}; end + local source = event.session.username .. "@" .. module.host .. "/admin_api"; + local invite; if invite_type == "reset" then if not options.username then @@ -130,9 +132,12 @@ if not options.groups then return 400; end - invite = invites.create_group(options.groups, nil, options.ttl); + invite = invites.create_group(options.groups, { + source = source; + }, options.ttl); elseif invite_type == "account" then invite = invites.create_account(options.username, { + source = source; groups = options.groups; }, options.ttl); else