--- a/mod_mam_adhoc/mod_mam_adhoc.lua Sat Aug 10 21:37:35 2013 +0200
+++ b/mod_mam_adhoc/mod_mam_adhoc.lua Sat Aug 10 21:51:29 2013 +0200
@@ -39,17 +39,12 @@
}
local function mam_prefs_handler(self, data, state)
- local username, hostname = jid_split(data.from);
+ local username = jid_split(data.from);
if state then -- the second return value
if data.action == "cancel" then
return { status = "canceled" };
end
- if not username or not hostname or hostname ~= module.host then
- return { status = "error", error = { type = "cancel",
- condition = "forbidden", message = "Invalid user or hostname." } };
- end
-
local fields = mam_prefs_form:data(data.form);
local default, always, never = fields.default, fields.always, fields.never;
@@ -99,4 +94,4 @@
end
end
-module:provides("adhoc", module:require"adhoc".new("Archive settings", "urn:xmpp:mam#configure", mam_prefs_handler));
+module:provides("adhoc", module:require"adhoc".new("Archive settings", "urn:xmpp:mam#configure", mam_prefs_handler, "local_user"));