Mercurial > eldonilo > lightstring
changeset 79:2290321f5c8b
Always having an id on out-iq.
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Tue, 07 Feb 2012 18:37:23 +0100 |
parents | 4d0fc1c9ec88 |
children | 50d36b093e3a |
files | lightstring.js |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lightstring.js +++ b/lightstring.js @@ -269,10 +269,10 @@ Lightstring.Connection.prototype = { var callback = {success: aSuccess, error: aError}; var id = stanza.DOM.getAttributeNS(null, 'id'); - if (!id) - ; //TODO: warning - else - this.callbacks[id] = callback; + if (!id) { + var id = Lightstring.newId('sendiq:'); + stanza.DOM.setAttributeNS(null, 'id', id); + } this.callbacks[id] = callback;