From e4eeb59cec524c9af9fdf03dfabbcd8b632490c9 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 9 Sep 2009 20:48:25 +0500 Subject: MUC: Preserve stanza attributes for private messages. --- plugins/muc/muc.lib.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/muc/muc.lib.lua') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index f8fd0fcd..04fc29cf 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -300,9 +300,10 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc if o_data then log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid); local jid = o_data.jid; - -- 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; + -- TODO if stanza.name=='iq' and type=='get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then jid = jid_bare(jid); end 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 -- cgit v1.2.3