aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2012-08-09 07:17:25 +0500
committerWaqas Hussain <waqas20@gmail.com>2012-08-09 07:17:25 +0500
commitd05d283041dacc0bd952179a93be2d274858a13b (patch)
tree41bd72d6ffcd1c0d34b275b6fc27c7e236a40df2
parent65fafa7b630fb34fdceb644d080dba517b47d142 (diff)
downloadprosody-d05d283041dacc0bd952179a93be2d274858a13b.tar.gz
prosody-d05d283041dacc0bd952179a93be2d274858a13b.zip
MUC: Fix a traceback caused by private IQ result and error stanzas where the encoded id can't be processed.
-rw-r--r--plugins/muc/muc.lib.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index ae6b8e54..a7603535 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -525,7 +525,9 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
if type == "error" or type == "result" and stanza.name == "iq" then
local id = stanza.attr.id;
stanza.attr.from, stanza.attr.to, stanza.attr.id = deconstruct_stanza_id(self, stanza);
- self:_route_stanza(stanza);
+ if stanza.attr.id then
+ self:_route_stanza(stanza);
+ end
stanza.attr.from, stanza.attr.to, stanza.attr.id = from, to, id;
else
origin.send(st.error_reply(stanza, "cancel", "not-acceptable"));
@@ -549,7 +551,9 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
if type == 'get' and stanza.tags[1].attr.xmlns == 'vcard-temp' then
stanza.attr.to = jid_bare(stanza.attr.to);
end
- self:_route_stanza(stanza);
+ if stanza.attr.id then
+ self:_route_stanza(stanza);
+ end
stanza.attr.from, stanza.attr.to, stanza.attr.id = from, to, id;
else -- message
stanza.attr.from = current_nick;