aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2012-08-04 23:22:16 +0500
committerWaqas Hussain <waqas20@gmail.com>2012-08-04 23:22:16 +0500
commit4c408e8dfee99aefb7dbaa266ffc9e6036c2a3b5 (patch)
tree47735d8ce72da6dbddffa8fff6624b436736a64c /plugins/muc/muc.lib.lua
parent537e1447c2d65576c2d8c37b1197c6ed897534a0 (diff)
downloadprosody-4c408e8dfee99aefb7dbaa266ffc9e6036c2a3b5.tar.gz
prosody-4c408e8dfee99aefb7dbaa266ffc9e6036c2a3b5.zip
MUC: Fix private IQ results and errors for non-vcard queries.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 6d37fbcc..ae6b8e54 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -541,7 +541,11 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
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