Only get channels and posts on WebSocket connect if team is set (#3684)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
f5375254f9
Коммит
199c55b566
@@ -62,8 +62,10 @@ export function getStatuses() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleReconnect() {
|
function handleReconnect() {
|
||||||
AsyncClient.getChannels();
|
if (Client.teamId) {
|
||||||
AsyncClient.getPosts(ChannelStore.getCurrentId());
|
AsyncClient.getChannels();
|
||||||
|
AsyncClient.getPosts(ChannelStore.getCurrentId());
|
||||||
|
}
|
||||||
getStatuses();
|
getStatuses();
|
||||||
ErrorStore.clearLastError();
|
ErrorStore.clearLastError();
|
||||||
ErrorStore.emitChange();
|
ErrorStore.emitChange();
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export default class Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getTeamId() {
|
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
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user