Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 1769:39865fbbb2f7
MUC: Preserve stanza attributes for private messages.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 09 Sep 2009 20:48:25 +0500 |
parent | 1768:802c40384dd0 |
child | 1778:f4213d84ba8a |
line wrap: on
line diff
--- 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