mod_csi_simple: Consider messages encrypted payload as important (fixes part of ...
[prosody.git] / plugins / mod_server_contact_info.lua
blob0110ceaffbdfa38d3300afd9eaf0720947ab2d71
1 -- XEP-0157: Contact Addresses for XMPP Services for Prosody
2 --
3 -- Copyright (C) 2011-2018 Kim Alvefur
4 --
5 -- This project is MIT/X11 licensed. Please see the
6 -- COPYING file in the source package for more information.
7 --
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" },
20 });
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);
27 });
29 module:add_extension(form_layout:form(contact_config, "result"));