comparison lightstring.js @ 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 d9804e206393
comparison
equal deleted inserted replaced
78:4d0fc1c9ec88 79:2290321f5c8b
267 ; //TODO: error 267 ; //TODO: error
268 268
269 var callback = {success: aSuccess, error: aError}; 269 var callback = {success: aSuccess, error: aError};
270 270
271 var id = stanza.DOM.getAttributeNS(null, 'id'); 271 var id = stanza.DOM.getAttributeNS(null, 'id');
272 if (!id) 272 if (!id) {
273 ; //TODO: warning 273 var id = Lightstring.newId('sendiq:');
274 else 274 stanza.DOM.setAttributeNS(null, 'id', id);
275 this.callbacks[id] = callback; 275 }
276 276
277 this.callbacks[id] = callback; 277 this.callbacks[id] = callback;
278 278
279 } 279 }
280 else if (aSuccess || aError) 280 else if (aSuccess || aError)