lib/junction/application.js
function prepareRes(stanza) {
  var res = null;
  
  if (stanza.is('iq') && (stanza.attr('type') == 'get' || stanza.attr('type') == 'set')) {
    // TODO: When connected as a component, the from field needs to be set
    //       eplicitly (from = stanza.attrs.to).
    res = new xmpp.Stanza('iq', { id: stanza.attr('id'),
                                  to: stanza.attr('from'),
                                  type: 'result' })
  }
  // TODO: Prepare presence and message stanzas (which are optional to send)
  
  return res;
}
function prepareRes(stanza) {
  var res = null;
  
  if (stanza.is('iq') && (stanza.attr('type') == 'get' || stanza.attr('type') == 'set')) {
    // TODO: When connected as a component, the from field needs to be set
    //       eplicitly (from = stanza.attrs.to).
    res = new xmpp.Stanza('iq', { id: stanza.attr('id'),
                                  to: stanza.attr('from'),
                                  type: 'result' })
  }
  // TODO: Prepare presence and message stanzas (which are optional to send)
  
  return res;
}
function prepareRes ( stanza ) { var res = null ; if ( stanza . is ( 'iq' ) && ( stanza . attr ( 'type' ) == 'get' || stanza . attr ( 'type' ) == 'set' ) ) { // TODO: When connected as a component, the from field needs to be set //       eplicitly (from = stanza.attrs.to). res = new xmpp . Stanza ( 'iq' , { id : stanza . attr ( 'id' ) , to : stanza . attr ( 'from' ) , type : 'result' } ) } // TODO: Prepare presence and message stanzas (which are optional to send) return res ; }
Prepare a response to `stanza`.

@api private
Prepare a response to stanza .