1 -- XEP-0157: Contact Addresses for XMPP Services for Prosody
3 -- Copyright (C) 2011-2018 Kim Alvefur
5 -- This project is MIT/X11 licensed. Please see the
6 -- COPYING file in the source package for more information.
9 local array
= require
"util.array";
11 -- Source: http://xmpp.org/registrar/formtypes.html#http:--jabber.org-network-serverinfo
12 local form_layout
= require
"util.dataforms".new({
13 { var
= "FORM_TYPE"; type = "hidden"; value
= "http://jabber.org/network/serverinfo"; };
14 { name
= "abuse", var
= "abuse-addresses", type = "list-multi" },
15 { name
= "admin", var
= "admin-addresses", type = "list-multi" },
16 { name
= "feedback", var
= "feedback-addresses", type = "list-multi" },
17 { name
= "sales", var
= "sales-addresses", type = "list-multi" },
18 { name
= "security", var
= "security-addresses", type = "list-multi" },
19 { name
= "support", var
= "support-addresses", type = "list-multi" },
22 -- JIDs of configured service admins are used as fallback
23 local admins
= module
:get_option_inherited_set("admins", {});
25 local contact_config
= module
:get_option("contact_info", {
26 admin
= array
.collect( admins
/ function(admin
) return "xmpp:" .. admin
; end);
29 module
:add_extension(form_layout
:form(contact_config
, "result"));