title: Bluebird.js Promise not chaining .then()s
body: <pre><code>socket.on('new video', function(data) {
      console.log("New video")
      var addToCueP = Promise.promisify(addToCue)
      var getCueFromDbP = Promise.promisify(getCueFromDb)
  
      addToCueP(data.id, socket.nickname)
      .then(function() {
          return getCueFromDbP();
      })
      .then(function() {
          console.log("Emit change video")
          io.sockets.emit('change video', {id: data.id, title: data.title, nick: socket.nickname});
      })          
  });
  </code></pre>
  
  <p>I am using Bluebird for promises but I'm having issues, the addToCue function gets called but the other functions after for example the getCuefromDb and the Socket emitter isnt getting triggered, does anyone have any idea where I'm going wrong?</p>
  
  <p><strong>addToCue()</strong></p>
  
  <pre><code>var addToCue = function(id, user) {
  console.log("Add to cue")
  var video = new Video();
  video.id = id;
  video.user = user;
  video.save(function(err, data) {
      if (err) {
          console.log(err)
      } else {
          return true
      }
  });
  }
  </code></pre>
  
  <p><strong>getCueFromDb()</strong></p>
  
  <pre><code>var getCueFromDb = function(callback) {
  Video.find({}).exec(function(err, videos) {
          if (err) {
              return err;
          }
          if (videos.length) {
              cue = []; // empty array
              videos.forEach(function(video) {
                  cue.push(video.id) // push all the videos from db into cue array
              });
              io.sockets.emit('send cue', {cue: cue});
              console.log("getCueFromDb", cue)
              if (callback) {
                  callback();
                  return
              }
              else {
                  return
              }
          }
          else {
              cue = [];
              io.sockets.emit('send cue', {cue: cue});
              console.log("getCueFromDb (no videos)", cue)
              if (callback)
                  callback()
              else
                  return
          }
  })
  }
  </code></pre>