Fix socket reconnect if the pubsub token is same (#942)

This commit is contained in:
Pranav Raj S 2020-06-08 19:13:33 +05:30 committed by GitHub
parent 52d28105e4
commit 602132119b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ class ActionCableConnector extends BaseActionCableConnector {
} }
export const refreshActionCableConnector = pubsubToken => { export const refreshActionCableConnector = pubsubToken => {
if (!pubsubToken) { if (!pubsubToken || window.chatwootPubsubToken === pubsubToken) {
return; return;
} }
window.chatwootPubsubToken = pubsubToken; window.chatwootPubsubToken = pubsubToken;