Mercurial > prosody-modules
changeset 1147:27b41ee61601
mod_mam_adhoc: Use the new adhoc permission level for local users
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 10 Aug 2013 21:51:29 +0200 |
parents | 9fa89dc7a86f |
children | 723367b5de8c |
files | mod_mam_adhoc/mod_mam_adhoc.lua |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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"));