Software /
code /
prosody
Diff
plugins/mod_server_contact_info.lua @ 11583:4ee7a6a8753e
mod_server_contact_info: Apply JID normalization
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 11 Sep 2020 18:34:06 +0200 |
parent | 11010:6b27cb706b89 |
child | 11584:8bea29d1f82d |
line wrap: on
line diff
--- a/plugins/mod_server_contact_info.lua Fri Jan 22 00:11:39 2021 +0100 +++ b/plugins/mod_server_contact_info.lua Fri Sep 11 18:34:06 2020 +0200 @@ -7,6 +7,7 @@ -- local array = require "util.array"; +local jid = require "util.jid"; -- Source: http://xmpp.org/registrar/formtypes.html#http:--jabber.org-network-serverinfo local form_layout = require "util.dataforms".new({ @@ -24,7 +25,7 @@ local admins = module:get_option_inherited_set("admins", {}); local contact_config = module:get_option("contact_info", { - admin = array.collect( admins / function(admin) return "xmpp:" .. admin; end); + admin = array.collect( admins / jid.prep / function(admin) return "xmpp:" .. admin; end); }); module:add_extension(form_layout:form(contact_config, "result"));