Remove new user event handling on client (#4822)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
8a92908dad
Коммит
52c4538817
@@ -115,10 +115,6 @@ function handleEvent(msg) {
|
||||
handlePostDeleteEvent(msg);
|
||||
break;
|
||||
|
||||
case SocketEvents.NEW_USER:
|
||||
handleNewUserEvent(msg);
|
||||
break;
|
||||
|
||||
case SocketEvents.LEAVE_TEAM:
|
||||
handleLeaveTeamEvent(msg);
|
||||
break;
|
||||
@@ -220,26 +216,6 @@ function handlePostDeleteEvent(msg) {
|
||||
}
|
||||
}
|
||||
|
||||
function handleNewUserEvent(msg) {
|
||||
if (TeamStore.getCurrentId() === '') {
|
||||
// Any new users will be loaded when we switch into a context with a team
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.data.user_id === UserStore.getCurrentId()) {
|
||||
// We should already have ourselves
|
||||
return;
|
||||
}
|
||||
|
||||
AsyncClient.getUser(msg.data.user_id);
|
||||
AsyncClient.getChannelStats();
|
||||
loadProfilesAndTeamMembersForDMSidebar();
|
||||
|
||||
if (msg.data.user_id === UserStore.getCurrentId()) {
|
||||
AsyncClient.getMyTeamMembers();
|
||||
}
|
||||
}
|
||||
|
||||
function handleLeaveTeamEvent(msg) {
|
||||
if (UserStore.getCurrentId() === msg.data.user_id) {
|
||||
TeamStore.removeMyTeamMember(msg.data.team_id);
|
||||
|
||||
Ссылка в новой задаче
Block a user