Comparison

plugins/muc/muc.lib.lua @ 5294:87f07dd0bbfb

MUC: Don't reply to errors (thanks iron)
author Kim Alvefur <zash@zash.se>
date Wed, 09 Jan 2013 17:56:40 +0100
parent 5241:4516e6bd51b4
child 5334:da7857891eb8
comparison
equal deleted inserted replaced
5293:fe9215155453 5294:87f07dd0bbfb
527 stanza.attr.from, stanza.attr.to, stanza.attr.id = deconstruct_stanza_id(self, stanza); 527 stanza.attr.from, stanza.attr.to, stanza.attr.id = deconstruct_stanza_id(self, stanza);
528 if stanza.attr.id then 528 if stanza.attr.id then
529 self:_route_stanza(stanza); 529 self:_route_stanza(stanza);
530 end 530 end
531 stanza.attr.from, stanza.attr.to, stanza.attr.id = from, to, id; 531 stanza.attr.from, stanza.attr.to, stanza.attr.id = from, to, id;
532 else 532 elseif type ~= "error" then
533 origin.send(st.error_reply(stanza, "cancel", "not-acceptable")); 533 origin.send(st.error_reply(stanza, "cancel", "not-acceptable"));
534 end 534 end
535 elseif stanza.name == "message" and type == "groupchat" then -- groupchat messages not allowed in PM 535 elseif stanza.name == "message" and type == "groupchat" then -- groupchat messages not allowed in PM
536 origin.send(st.error_reply(stanza, "modify", "bad-request")); 536 origin.send(st.error_reply(stanza, "modify", "bad-request"));
537 elseif current_nick and stanza.name == "message" and type == "error" and is_kickable_error(stanza) then 537 elseif current_nick and stanza.name == "message" and type == "error" and is_kickable_error(stanza) then