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 5077:6c2c8bf36d22
children 5079:2ab99e239d45
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Fri Aug 03 14:07:41 2012 +0100
+++ b/plugins/muc/muc.lib.lua	Sat Aug 04 23:22:16 2012 +0500
@@ -541,7 +541,11 @@
 			log("debug", "%s sent private stanza to %s (%s)", from, to, o_data.jid);
 			if stanza.name == "iq" then
 				local id = stanza.attr.id;
-				stanza.attr.from, stanza.attr.to, stanza.attr.id = construct_stanza_id(self, stanza);
+				if stanza.attr.type == "get" or stanza.attr.type == "set" then
+					stanza.attr.from, stanza.attr.to, stanza.attr.id = construct_stanza_id(self, stanza);
+				else
+					stanza.attr.from, stanza.attr.to, stanza.attr.id = deconstruct_stanza_id(self, stanza);
+				end
 				if type == 'get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then
 					stanza.attr.to = jid_bare(stanza.attr.to);
 				end