comparison plugins/muc/muc.lib.lua @ 5088:d5bb9cd2e6df

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Fri, 10 Aug 2012 16:32:40 +0100
parents 1ef9aa0c9fb0
children a30507061526
comparison
equal deleted inserted replaced
5087:71a5a6a6c74c 5088:d5bb9cd2e6df
523 end 523 end
524 elseif not current_nick then -- not in room 524 elseif not current_nick then -- not in room
525 if type == "error" or type == "result" and stanza.name == "iq" then 525 if type == "error" or type == "result" and stanza.name == "iq" then
526 local id = stanza.attr.id; 526 local id = stanza.attr.id;
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 self:_route_stanza(stanza); 528 if stanza.attr.id then
529 self:_route_stanza(stanza);
530 end
529 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;
530 else 532 else
531 origin.send(st.error_reply(stanza, "cancel", "not-acceptable")); 533 origin.send(st.error_reply(stanza, "cancel", "not-acceptable"));
532 end 534 end
533 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
547 stanza.attr.from, stanza.attr.to, stanza.attr.id = deconstruct_stanza_id(self, stanza); 549 stanza.attr.from, stanza.attr.to, stanza.attr.id = deconstruct_stanza_id(self, stanza);
548 end 550 end
549 if type == 'get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then 551 if type == 'get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then
550 stanza.attr.to = jid_bare(stanza.attr.to); 552 stanza.attr.to = jid_bare(stanza.attr.to);
551 end 553 end
552 self:_route_stanza(stanza); 554 if stanza.attr.id then
555 self:_route_stanza(stanza);
556 end
553 stanza.attr.from, stanza.attr.to, stanza.attr.id = from, to, id; 557 stanza.attr.from, stanza.attr.to, stanza.attr.id = from, to, id;
554 else -- message 558 else -- message
555 stanza.attr.from = current_nick; 559 stanza.attr.from = current_nick;
556 for jid in pairs(o_data.sessions) do 560 for jid in pairs(o_data.sessions) do
557 stanza.attr.to = jid; 561 stanza.attr.to = jid;