Software /
code /
verse
Diff
bosh.lua @ 261:c1404c69dec9
verse.bosh: Fix to loop over every child tag (childtags() is now too namespace-aware for this purpose)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 07 Dec 2011 02:45:11 +0000 |
parent | 161:b177bcea2006 |
child | 262:f47afb171e6e |
line wrap: on
line diff
--- a/bosh.lua Mon Dec 05 15:44:17 2011 +0000 +++ b/bosh.lua Wed Dec 07 02:45:11 2011 +0000 @@ -158,7 +158,9 @@ end function stream_mt:_handle_response_payload(payload) - for stanza in payload:childtags() do + local stanzas = payload.tags; + for i = 1, #stanzas do + local stanza = stanzas[i]; if stanza.attr.xmlns == xmlns_stream then self:event("stream-"..stanza.name, stanza); elseif stanza.attr.xmlns then