MUC: Don't reply to error stanzas with more error stanzas (thanks woffs)
authorKim Alvefur <zash@zash.se>
Mon, 7 Mar 2016 09:59:37 +0000 (10:59 +0100)
committerKim Alvefur <zash@zash.se>
Mon, 7 Mar 2016 09:59:37 +0000 (10:59 +0100)
plugins/muc/mod_muc.lua

index 4f5831a62c24e447efced881bf25eb72a0c9201f..74909d9b7f19193fbf3a29df1cf7d8f14d4cef3f 100644 (file)
@@ -255,9 +255,11 @@ for event_name, method in pairs {
                        -- Watch presence to create rooms
                        if stanza.attr.type == nil and stanza.name == "presence" then
                                room = muclib.new_room(room_jid);
-                       else
+                       elseif stanza.attr.type ~= "error" then
                                origin.send(st.error_reply(stanza, "cancel", "not-allowed"));
                                return true;
+                       else
+                               return;
                        end
                end
                return room[method](room, origin, stanza);