trunk

changeset 5078:cba0b426b542

MUC: Fix private IQ results and errors for non-vcard queries.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 04 Aug 2012 23:22:16 +0500
parents 6c2c8bf36d22
children 2ab99e239d45
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/plugins/muc/muc.lib.lua	Fri Aug 03 14:07:41 2012 +0100
     1.2 +++ b/plugins/muc/muc.lib.lua	Sat Aug 04 23:22:16 2012 +0500
     1.3 @@ -541,7 +541,11 @@
     1.4  			log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid);
     1.5  			if stanza.name == "iq" then
     1.6  				local id = stanza.attr.id;
     1.7 -				stanza.attr.from, stanza.attr.to, stanza.attr.id = construct_stanza_id(self, stanza);
     1.8 +				if stanza.attr.type == "get" or stanza.attr.type == "set" then
     1.9 +					stanza.attr.from, stanza.attr.to, stanza.attr.id = construct_stanza_id(self, stanza);
    1.10 +				else
    1.11 +					stanza.attr.from, stanza.attr.to, stanza.attr.id = deconstruct_stanza_id(self, stanza);
    1.12 +				end
    1.13  				if type == 'get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then
    1.14  					stanza.attr.to = jid_bare(stanza.attr.to);
    1.15  				end