sulla icon indicating copy to clipboard operation
sulla copied to clipboard

how to get status of session?

Open chitogamer96 opened this issue 4 years ago • 3 comments

I have an api rest with express and I have a route to create new sessions but I would like to know if a connection has already been created and if so, then delete it and create it again

chitogamer96 avatar May 06 '20 23:05 chitogamer96

I would like to know too.

willianmaria avatar May 07 '20 10:05 willianmaria

there must be client.state() but you can grab session state by trying this

client.onStateChange((state) => { console.log(state); const conflits = [ sulla.SocketState.CONFLICT, sulla.SocketState.UNPAIRED, sulla.SocketState.UNLAUNCHED, ]; if (conflits.includes(state)) { client.useHere(); } }); `

TheCBKM avatar May 07 '20 10:05 TheCBKM

the repository is deprecated use

Install npm i @s2click/venom https://github.com/s2click/venom

joedutra avatar Jun 06 '20 23:06 joedutra