Software /
code /
prosody-modules
Comparison
mod_mam_muc/mod_mam_muc.lua @ 1865:db8b256f51ff
mod_admin_web,mod_carbons,mod_csi_compat,mod_mam_muc,mod_tcpproxy: Explicitly return true
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 21 Sep 2015 20:03:08 +0200 |
parent | 1691:1a8c791d365f |
child | 1973:9329a11c03a6 |
comparison
equal
deleted
inserted
replaced
1864:991a5f74f848 | 1865:db8b256f51ff |
---|---|
151 local orig_from = stanza.attr.from; | 151 local orig_from = stanza.attr.from; |
152 local query = stanza.tags[1]; | 152 local query = stanza.tags[1]; |
153 | 153 |
154 local room_obj = get_room_from_jid(room); | 154 local room_obj = get_room_from_jid(room); |
155 if not room_obj then | 155 if not room_obj then |
156 return origin.send(st.error_reply(stanza, "cancel", "item-not-found")) | 156 origin.send(st.error_reply(stanza, "cancel", "item-not-found")) |
157 return true; | |
157 end | 158 end |
158 local from = jid_bare(orig_from); | 159 local from = jid_bare(orig_from); |
159 | 160 |
160 -- Banned or not a member of a members-only room? | 161 -- Banned or not a member of a members-only room? |
161 local from_affiliation = room_obj:get_affiliation(from); | 162 local from_affiliation = room_obj:get_affiliation(from); |
162 if from_affiliation == "outcast" -- banned | 163 if from_affiliation == "outcast" -- banned |
163 or room_obj:get_members_only() and not from_affiliation then -- members-only, not a member | 164 or room_obj:get_members_only() and not from_affiliation then -- members-only, not a member |
164 return origin.send(st.error_reply(stanza, "auth", "forbidden")) | 165 origin.send(st.error_reply(stanza, "auth", "forbidden")) |
166 return true; | |
165 end | 167 end |
166 | 168 |
167 local qid = query.attr.queryid; | 169 local qid = query.attr.queryid; |
168 | 170 |
169 -- Search query parameters | 171 -- Search query parameters |
205 total = true; | 207 total = true; |
206 with = "message<groupchat"; | 208 with = "message<groupchat"; |
207 }); | 209 }); |
208 | 210 |
209 if not data then | 211 if not data then |
210 return origin.send(st.error_reply(stanza, "cancel", "internal-server-error")); | 212 origin.send(st.error_reply(stanza, "cancel", "internal-server-error")); |
213 return true; | |
211 end | 214 end |
212 local total = err; | 215 local total = err; |
213 | 216 |
214 origin.send(st.reply(stanza)) | 217 origin.send(st.reply(stanza)) |
215 local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to }; | 218 local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to }; |