waiting for POST request to XMPP route to finish before returning