Comparison

plugins/muc/mod_muc.lua @ 8705:1d66f66a13c9

MUC: Don't reply to errors with more errors (fixes #1122)
author Kim Alvefur <zash@zash.se>
date Wed, 28 Mar 2018 18:11:09 +0200
parent 8704:c0e812dd9dfc
child 8707:fd39c44c0113
child 8841:bc8558bbc797
comparison
equal deleted inserted replaced
8704:c0e812dd9dfc 8705:1d66f66a13c9
169 local origin, stanza = event.origin, event.stanza; 169 local origin, stanza = event.origin, event.stanza;
170 local bare = jid_bare(stanza.attr.to); 170 local bare = jid_bare(stanza.attr.to);
171 local room = rooms[bare]; 171 local room = rooms[bare];
172 if not room then 172 if not room then
173 if stanza.name ~= "presence" or stanza.attr.type ~= nil then 173 if stanza.name ~= "presence" or stanza.attr.type ~= nil then
174 origin.send(st.error_reply(stanza, "cancel", "item-not-found")); 174 if stanza.attr.type ~= "error" then
175 origin.send(st.error_reply(stanza, "cancel", "item-not-found"));
176 end
175 return true; 177 return true;
176 end 178 end
177 if not(restrict_room_creation) or 179 if not(restrict_room_creation) or
178 is_admin(stanza.attr.from) or 180 is_admin(stanza.attr.from) or
179 (restrict_room_creation == "local" and select(2, jid_split(stanza.attr.from)) == module.host:gsub("^[^%.]+%.", "")) then 181 (restrict_room_creation == "local" and select(2, jid_split(stanza.attr.from)) == module.host:gsub("^[^%.]+%.", "")) then