Software /
code /
prosody
Comparison
plugins/muc/mod_muc.lua @ 7246:80923a1a8fe1
MUC: Don't reply to error stanzas with more error stanzas (thanks woffs)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 07 Mar 2016 10:59:37 +0100 |
parent | 7086:6cc7c9da29ed |
child | 7269:cde4ef90cf3d |
comparison
equal
deleted
inserted
replaced
7245:210d8329dc70 | 7246:80923a1a8fe1 |
---|---|
253 local room = get_room_from_jid(room_jid); | 253 local room = get_room_from_jid(room_jid); |
254 if room == nil then | 254 if room == nil then |
255 -- Watch presence to create rooms | 255 -- Watch presence to create rooms |
256 if stanza.attr.type == nil and stanza.name == "presence" then | 256 if stanza.attr.type == nil and stanza.name == "presence" then |
257 room = muclib.new_room(room_jid); | 257 room = muclib.new_room(room_jid); |
258 else | 258 elseif stanza.attr.type ~= "error" then |
259 origin.send(st.error_reply(stanza, "cancel", "not-allowed")); | 259 origin.send(st.error_reply(stanza, "cancel", "not-allowed")); |
260 return true; | 260 return true; |
261 else | |
262 return; | |
261 end | 263 end |
262 end | 264 end |
263 return room[method](room, origin, stanza); | 265 return room[method](room, origin, stanza); |
264 end, -2) | 266 end, -2) |
265 end | 267 end |