Bug 918970 - display existing thread when sending a sms from contact app

old PR : https://github.com/mozilla-b2g/gaia/pull/16216

I think you can rewrite this like this (I remove the "this" and object names so that it's shorter to write and read :) ):
```javascript
return findThreadFromNumber(viewInfo.number).then(
  function onresolve(threadId) {
    viewInfo.threadId = threadId;
  },
  function onreject() {
    // we return the result so that we wait that it's finished before going on
    return findContactByNumber(viewInfo.number)
      .then((contact) => viewInfo.contact = contact);
  }
)
.catch(() => {}) // gobble errors
.then(() => {
  return this.toView(viewInfo); // final action
});
```