I\'m having a function returning a promise. In this function, we call a third party vender to send some push notification through their server.
it looks like
Insert another promise in the chain which delays the next one:
apiGetLoggedInUser .then(user => { return new Promise(resolve => setTimeout(() => resolve(user), 3000)); }) .then(user => sendMessage(user.name))