use session.poll as well for polling when receiving a message

This commit is contained in:
Bruno Windels 2019-04-16 11:55:33 +02:00
parent 9610e9b57e
commit 20c3023b94
3 changed files with 14 additions and 19 deletions

View file

@ -65,7 +65,7 @@ module.exports = async function signup(session, username, password, homeserver)
//wait for registration to finish so the hash gets set
//onhashchange better?
const foundHomeUrl = await session.poll(() => {
const foundHomeUrl = await session.poll(async () => {
const url = session.page.url();
return url === session.url('/#/home');
}, 5000);