mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fixing socket store loc
This commit is contained in:
@@ -20,31 +20,31 @@ import {intlShape, injectIntl, defineMessages} from 'mm-intl';
|
||||
const holders = defineMessages({
|
||||
socketError: {
|
||||
id: 'channel_loader.socketError',
|
||||
defaultMessage: 'Please check connection, Mattermost unreachable. If issue persists, ask administrator to check WebSocket port.'
|
||||
defaultMessage: SocketStore.getDefaultTranslations().socketError
|
||||
},
|
||||
someone: {
|
||||
id: 'channel_loader.someone',
|
||||
defaultMessage: 'Someone'
|
||||
defaultMessage: SocketStore.getDefaultTranslations().someone
|
||||
},
|
||||
posted: {
|
||||
id: 'channel_loader.posted',
|
||||
defaultMessage: 'Posted'
|
||||
defaultMessage: SocketStore.getDefaultTranslations().posted
|
||||
},
|
||||
uploadedImage: {
|
||||
id: 'channel_loader.uploadedImage',
|
||||
defaultMessage: ' uploaded an image'
|
||||
defaultMessage: SocketStore.getDefaultTranslations().uploadedImage
|
||||
},
|
||||
uploadedFile: {
|
||||
id: 'channel_loader.uploadedFile',
|
||||
defaultMessage: ' uploaded a file'
|
||||
defaultMessage: SocketStore.getDefaultTranslations().uploadedFile
|
||||
},
|
||||
something: {
|
||||
id: 'channel_loader.something',
|
||||
defaultMessage: ' did something new'
|
||||
defaultMessage: SocketStore.getDefaultTranslations().something
|
||||
},
|
||||
wrote: {
|
||||
id: 'channel_loader.wrote',
|
||||
defaultMessage: ' wrote: '
|
||||
defaultMessage: SocketStore.getDefaultTranslations().wrote
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ class SocketStoreClass extends EventEmitter {
|
||||
|
||||
this.failCount = 0;
|
||||
|
||||
this.translations = this.getDefaultTranslations();
|
||||
|
||||
this.initialize();
|
||||
}
|
||||
|
||||
@@ -174,6 +176,18 @@ class SocketStoreClass extends EventEmitter {
|
||||
this.translations = messages;
|
||||
}
|
||||
|
||||
getDefaultTranslations() {
|
||||
return ({
|
||||
socketError: 'Please check connection, Mattermost unreachable. If issue persists, ask administrator to check WebSocket port.',
|
||||
someone: 'Someone',
|
||||
posted: 'Posted',
|
||||
uploadedImage: ' uploaded an image',
|
||||
uploadedFile: ' uploaded a file',
|
||||
something: ' did something new',
|
||||
wrote: ' wrote: '
|
||||
});
|
||||
}
|
||||
|
||||
close() {
|
||||
if (conn && conn.readyState === WebSocket.OPEN) {
|
||||
conn.close();
|
||||
|
||||
Reference in New Issue
Block a user