mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Only get channels and posts on WebSocket connect if team is set (#3684)
This commit is contained in:
committed by
Christopher Speller
parent
f5375254f9
commit
199c55b566
@@ -62,8 +62,10 @@ export function getStatuses() {
|
||||
}
|
||||
|
||||
function handleReconnect() {
|
||||
AsyncClient.getChannels();
|
||||
AsyncClient.getPosts(ChannelStore.getCurrentId());
|
||||
if (Client.teamId) {
|
||||
AsyncClient.getChannels();
|
||||
AsyncClient.getPosts(ChannelStore.getCurrentId());
|
||||
}
|
||||
getStatuses();
|
||||
ErrorStore.clearLastError();
|
||||
ErrorStore.emitChange();
|
||||
|
||||
@@ -40,7 +40,7 @@ export default class Client {
|
||||
}
|
||||
|
||||
getTeamId() {
|
||||
if (this.teamId === '') {
|
||||
if (!this.teamId) {
|
||||
console.error('You are trying to use a route that requires a team_id, but you have not called setTeamId() in client.jsx'); // eslint-disable-line no-console
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user