Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 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 |
parent | 5063:4bc202a7b351 |
child | 5086:1ef9aa0c9fb0 |
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