changeset 4349:5ca36c36ab05

mod_http_admin_api: Expose new invite properties: groups, source and reusable
author Matthew Wild <mwild1@gmail.com>
date Sun, 17 Jan 2021 17:46:02 +0000
parents 46fb40d7f65a
children 270025e76bf8
files mod_http_admin_api/mod_http_admin_api.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_admin_api/mod_http_admin_api.lua	Sun Jan 17 17:44:51 2021 +0000
+++ b/mod_http_admin_api/mod_http_admin_api.lua	Sun Jan 17 17:46:02 2021 +0000
@@ -54,14 +54,20 @@
 end
 
 local function token_info_to_invite_info(token_info)
+	local additional_data = token_info.additional_data;
+	local groups = additional_data and additional_data.groups or nil;
+	local source = additional_data and additional_data.source or nil;
 	return {
 		id = token_info.token;
 		type = token_info.type;
+		reusable = token_info.reusable;
 		inviter = token_info.inviter;
 		jid = token_info.jid;
 		landing_page = token_info.landing_page;
 		created_at = token_info.created_at;
 		expires = token_info.expires;
+		groups = groups;
+		source = source;
 	};
 end