Software /
code /
prosody-modules
Diff
mod_mam_muc/mod_mam_muc.lua @ 1140:402cb9b604eb
mod_mam_muc: Send proper error reply when one is not allowed to query archive
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 10 Aug 2013 21:10:03 +0200 |
parent | 1139:b32d65e41755 |
child | 1141:1091be1c3aba |
line wrap: on
line diff
--- 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;