Only connect to chat when authenticating in the first place

To avoid duplication of the connection, the chat socket is destroyed
upon logging out.
This commit is contained in:
slice 2019-03-10 11:23:27 -07:00
parent a67881b096
commit e618c6ffb0
No known key found for this signature in database
GPG key ID: 1508C19D7436A26D
4 changed files with 15 additions and 5 deletions

View file

@ -89,10 +89,8 @@ const afterStoreSetup = ({ store, i18n }) => {
copyInstanceOption('noAttachmentLinks')
copyInstanceOption('showFeaturesPanel')
if ((config.chatDisabled)) {
if (config.chatDisabled) {
store.dispatch('disableChat')
} else {
store.dispatch('initializeSocket')
}
return store.dispatch('setTheme', config['theme'])