PLT-2863 fixing bad merge that broke this PR (#3523)
* PLT-2863 adding remove user from team * PLT-2863 adding the client side UI * Fixing trailing space * Fixing reported issues * Adding documentatino * Switching to final javascript driver * Fixing bad merge * Fixing bad merge
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
3358d81fa7
Коммит
25385c8c2a
@@ -205,6 +205,19 @@ export function emitPostFocusRightHandSideFromSearch(post, isMentionSearch) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function emitLeaveTeam() {
|
||||||
|
Client.removeUserFromTeam(
|
||||||
|
TeamStore.getCurrentId(),
|
||||||
|
UserStore.getCurrentId(),
|
||||||
|
() => {
|
||||||
|
// DO nothing. The websocket should cause a re-direct
|
||||||
|
},
|
||||||
|
(err) => {
|
||||||
|
AsyncClient.dispatchError(err, 'removeUserFromTeam');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export function emitLoadMorePostsEvent() {
|
export function emitLoadMorePostsEvent() {
|
||||||
const id = ChannelStore.getCurrentId();
|
const id = ChannelStore.getCurrentId();
|
||||||
loadMorePostsTop(id, false);
|
loadMorePostsTop(id, false);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import Client from 'utils/web_client.jsx';
|
|||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import * as GlobalActions from 'actions/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
import * as UserActions from 'actions/user_actions.jsx';
|
||||||
import {handleNewPost} from 'actions/post_actions.jsx';
|
import {handleNewPost} from 'actions/post_actions.jsx';
|
||||||
|
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
@@ -232,6 +233,7 @@ function handleLeaveTeamEvent(msg) {
|
|||||||
browserHistory.push('/');
|
browserHistory.push('/');
|
||||||
}
|
}
|
||||||
} else if (TeamStore.getCurrentId() === msg.team_id) {
|
} else if (TeamStore.getCurrentId() === msg.team_id) {
|
||||||
|
UserActions.getMoreDmList();
|
||||||
GlobalActions.emitProfilesForDmList();
|
GlobalActions.emitProfilesForDmList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user