diff --git a/plugins/mod_server_contact_info.lua b/plugins/mod_server_contact_info.lua
index 9c916ebc4..df2f08422 100644
--- a/plugins/mod_server_contact_info.lua
+++ b/plugins/mod_server_contact_info.lua
@@ -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 form_layout = require "util.dataforms".new({
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"));
diff --git a/spec/scansion/prosody.cfg.lua b/spec/scansion/prosody.cfg.lua
index 3ed97e311..c5ed279bd 100644
--- a/spec/scansion/prosody.cfg.lua
+++ b/spec/scansion/prosody.cfg.lua
@@ -124,8 +124,10 @@ hide_os_type = true -- absence tested for in version.scs
Component "conference.localhost" "muc"
storage = "memory"
+ admins = { "Admin@localhost" }
modules_enabled = {
"muc_mam";
+ "server_contact_info";
}
diff --git a/spec/scansion/server_contact_info.scs b/spec/scansion/server_contact_info.scs
index 6efc7fd16..f33d09578 100644
--- a/spec/scansion/server_contact_info.scs
+++ b/spec/scansion/server_contact_info.scs
@@ -53,4 +53,29 @@ Romeo receives:
+
+Romeo sends:
+
+
+
+
+
+
+
+
+ http://jabber.org/network/serverinfo
+
+
+
+ xmpp:admin@localhost
+
+
+
+
+
+
+
+
+
+
Romeo disconnects