# HG changeset patch # User Kim Alvefur # Date 1376161803 -7200 # Node ID 402cb9b604eb6840eb1a1b46fb60c7cfc1f60957 # Parent b32d65e41755926e36fee0f0bea525555d2cb39b mod_mam_muc: Send proper error reply when one is not allowed to query archive diff -r b32d65e41755 -r 402cb9b604eb mod_mam_muc/mod_mam_muc.lua --- a/mod_mam_muc/mod_mam_muc.lua Sat Aug 10 21:08:45 2013 +0200 +++ b/mod_mam_muc/mod_mam_muc.lua Sat Aug 10 21:10:03 2013 +0200 @@ -41,9 +41,10 @@ end local from = jid_bare(stanza.attr.from); + -- Banned or not a member of a members-only room? if room_obj._affiliations[from] == "outcast" or room_obj._data.members_only and not room_obj._affiliations[from] then - return -- FIXME unauth + return origin.send(st.error_reply(stanza, "auth", "forbidden")) end local qid = query.attr.queryid;