lib/comm.js
//-- Should only pass done for single user 'to'
Should only pass done for single user 'to'
Should only pass done for single user ' to '
function send(to, done) {
    if (to.constructor !== Array) to = [to]
    var sent = []
    var cb = !done ? null : ((e,r) => {
      sent.push(e||r)
      if (sent.length == to.length)
        done(null, to.length == 1 ? sent[0] : sent)
    })
    for (var user of to) {
      var msg = opts.raw ||
                Composer.render(Object.assign({to:user},opts))
      dispatch.toUser(user, msg, opts, cb)
    }
  }
function send ( to , done ) { if ( to . constructor !== Array ) to = [ to ] var sent = [ ] var cb = ! done ? null : ( ( e , r ) => { sent . push ( e || r ) if ( sent . length == to . length ) done ( null , to . length == 1 ? sent [ 0 ] : sent ) } ) for ( var user of to ) { var msg = opts . raw || Composer . render ( Object . assign ( { to : user } , opts ) ) dispatch . toUser ( user , msg , opts , cb ) } }
Should only pass done for single user 'to'
Should only pass done for single user ' to '