Software /
code /
prosody
Comparison
plugins/mod_server_contact_info.lua @ 12981:d795e3bbc0e3
mod_server_contact_info: Reorder dataform keys for more aligned view
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 24 Mar 2023 16:29:48 +0100 |
parent | 12977:74b9e05af71e |
comparison
equal
deleted
inserted
replaced
12980:6ebad8e16b3b | 12981:d795e3bbc0e3 |
---|---|
5 -- This project is MIT/X11 licensed. Please see the | 5 -- This project is MIT/X11 licensed. Please see the |
6 -- COPYING file in the source package for more information. | 6 -- COPYING file in the source package for more information. |
7 -- | 7 -- |
8 | 8 |
9 local array = require "prosody.util.array"; | 9 local array = require "prosody.util.array"; |
10 local dataforms = require "prosody.util.dataforms"; | |
10 local jid = require "prosody.util.jid"; | 11 local jid = require "prosody.util.jid"; |
11 local url = require "socket.url"; | 12 local url = require "socket.url"; |
12 | 13 |
13 -- Source: http://xmpp.org/registrar/formtypes.html#http:--jabber.org-network-serverinfo | 14 -- Source: http://xmpp.org/registrar/formtypes.html#http:--jabber.org-network-serverinfo |
14 local form_layout = require "prosody.util.dataforms".new({ | 15 local form_layout = dataforms.new({ |
15 { var = "FORM_TYPE"; type = "hidden"; value = "http://jabber.org/network/serverinfo"; }; | 16 { var = "FORM_TYPE"; type = "hidden"; value = "http://jabber.org/network/serverinfo" }; |
16 { name = "abuse", var = "abuse-addresses", type = "list-multi" }, | 17 { type = "list-multi"; name = "abuse"; var = "abuse-addresses" }; |
17 { name = "admin", var = "admin-addresses", type = "list-multi" }, | 18 { type = "list-multi"; name = "admin"; var = "admin-addresses" }; |
18 { name = "feedback", var = "feedback-addresses", type = "list-multi" }, | 19 { type = "list-multi"; name = "feedback"; var = "feedback-addresses" }; |
19 { name = "sales", var = "sales-addresses", type = "list-multi" }, | 20 { type = "list-multi"; name = "sales"; var = "sales-addresses" }; |
20 { name = "security", var = "security-addresses", type = "list-multi" }, | 21 { type = "list-multi"; name = "security"; var = "security-addresses" }; |
21 { name = "status", var = "status-addresses", type = "list-multi" }, | 22 { type = "list-multi"; name = "status"; var = "status-addresses" }; |
22 { name = "support", var = "support-addresses", type = "list-multi" }, | 23 { type = "list-multi"; name = "support"; var = "support-addresses" }; |
23 }); | 24 }); |
24 | 25 |
25 -- JIDs of configured service admins are used as fallback | 26 -- JIDs of configured service admins are used as fallback |
26 local admins = module:get_option_inherited_set("admins", {}); | 27 local admins = module:get_option_inherited_set("admins", {}); |
27 | 28 |