Software / code / prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
| 1768:802c40384dd0 | 1769:39865fbbb2f7 |
|---|---|
| 298 else -- private stanza | 298 else -- private stanza |
| 299 local o_data = self._occupants[to]; | 299 local o_data = self._occupants[to]; |
| 300 if o_data then | 300 if o_data then |
| 301 log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid); | 301 log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid); |
| 302 local jid = o_data.jid; | 302 local jid = o_data.jid; |
| 303 stanza.attr.to, stanza.attr.from = jid, current_nick; | |
| 303 -- TODO if stanza.name=='iq' and type=='get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then jid = jid_bare(jid); end | 304 -- TODO if stanza.name=='iq' and type=='get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then jid = jid_bare(jid); end |
| 304 stanza.attr.to, stanza.attr.from = jid, current_nick; | |
| 305 self:route_stanza(stanza); | 305 self:route_stanza(stanza); |
| 306 stanza.attr.to, stanza.attr.from = to, from; | |
| 306 elseif type ~= "error" and type ~= "result" then -- recipient not in room | 307 elseif type ~= "error" and type ~= "result" then -- recipient not in room |
| 307 origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Recipient not in room")); | 308 origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Recipient not in room")); |
| 308 end | 309 end |
| 309 end | 310 end |
| 310 end | 311 end |