MUC: Preserve stanza attributes for private messages.
--- a/plugins/muc/muc.lib.lua Wed Sep 09 20:32:37 2009 +0500
+++ b/plugins/muc/muc.lib.lua Wed Sep 09 20:48:25 2009 +0500
@@ -300,9 +300,10 @@
if o_data then
log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid);
local jid = o_data.jid;
+ stanza.attr.to, stanza.attr.from = jid, current_nick;
-- TODO if stanza.name=='iq' and type=='get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then jid = jid_bare(jid); end
- stanza.attr.to, stanza.attr.from = jid, current_nick;
self:route_stanza(stanza);
+ stanza.attr.to, stanza.attr.from = to, from;
elseif type ~= "error" and type ~= "result" then -- recipient not in room
origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Recipient not in room"));
end