Dan Poltawski 877d997fe1 MDL-57139 messages/notifications: ensure promise best practices
Previously there were a few issues with the code

* We were capturing a promise without then then .then() that came after
  it, so our promise wouldn't always be completely resolved by the time
  then next piece of code was operating on it

* We weren't catching all errors with .catch()
2017-06-01 10:27:58 +01:00
..