QB.chat listeners not working?
BertoGz opened this issue · 2 comments
Im trying to follow the docs to test out the listeners so I can begin using them in my app.
sample:
QB.chat.disconnect();
QB.chat.onDisconnectedListener = onDisconnectedListener;
function onDisconnectedListener() {
console.log("onDisconnected");
}
But so far nothing is being console logged. I've also tested out with onSubscribeListener, onReconnectListener but no luck.
I checked the code in module and I saw this:
A bunch of JsDoc for the functions but they don't seem to exist ?
Anyone having similar troubles or is this still wip? Thanks.
I just realize that there is not a connect listener. I presumed that either the reconnect, or onConfirmSubscribe listener would be called but actually those are not the intended listeners to use. My work around for a "chat connect listener" is to simply update a "ChatConnected" state to true in the resolution of QB.Chat.Connect().
Then if my disconnect listener is called, update my chatConnected state to false.