Initialize chat only if user is logged in and it wasn't initialized before

This commit is contained in:
Sergey Suprunenko 2019-08-17 08:18:42 +00:00 committed by Shpuld Shpludson
parent 58713e342d
commit d74f6ed6ea
7 changed files with 17 additions and 30 deletions

View file

@ -410,7 +410,7 @@ const users = {
})
.then(() => {
store.commit('clearCurrentUser')
store.dispatch('disconnectFromChat')
store.dispatch('disconnectFromSocket')
store.commit('clearToken')
store.dispatch('stopFetching', 'friends')
store.commit('setBackendInteractor', backendInteractorService(store.getters.getToken()))