Fix autocomplete and replying to flagged posts (#6690)

Этот коммит содержится в:
Joram Wilander
2017-06-20 08:56:38 -04:00
коммит произвёл GitHub
родитель 5627f3fd1d
Коммит effaeee830
2 изменённых файлов: 6 добавлений и 17 удалений

Просмотреть файл

@@ -36,6 +36,7 @@ const dispatch = store.dispatch;
const getState = store.getState;
import {removeUserFromTeam} from 'mattermost-redux/actions/teams';
import {viewChannel, getChannelStats, getMyChannelMember, getChannelAndMyMember} from 'mattermost-redux/actions/channels';
import {getPostThread} from 'mattermost-redux/actions/posts';
export function emitChannelClickEvent(channel) {
function userVisitedFakeChannel(chan, success, fail) {
@@ -158,17 +159,8 @@ export function emitCloseRightHandSide() {
}
export function emitPostFocusRightHandSideFromSearch(post, isMentionSearch) {
Client.getPost(
post.channel_id,
post.id,
(data) => {
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_POSTS,
id: post.channel_id,
numRequested: 0,
post_list: data
});
getPostThread(post.id)(dispatch, getState).then(
() => {
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_POST_SELECTED,
postId: Utils.getRootId(post),
@@ -182,9 +174,6 @@ export function emitPostFocusRightHandSideFromSearch(post, isMentionSearch) {
results: null,
is_mention_search: isMentionSearch
});
},
(err) => {
AsyncClient.dispatchError(err, 'getPost');
}
);
}

Просмотреть файл

@@ -474,7 +474,7 @@ export function searchUsersNotInTeam(term, teamId = TeamStore.getCurrentId(), op
export function autocompleteUsersInChannel(username, channelId, success) {
const channel = ChannelStore.get(channelId);
const teamId = channel ? channel.team_id : TeamStore.getCurrentId();
UserActions.autocomplete(username, teamId, channelId)(dispatch, getState).then(
UserActions.autocompleteUsers(username, teamId, channelId)(dispatch, getState).then(
(data) => {
if (success) {
success(data);
@@ -484,7 +484,7 @@ export function autocompleteUsersInChannel(username, channelId, success) {
}
export function autocompleteUsersInTeam(username, success) {
UserActions.autocomplete(username, TeamStore.getCurrentId())(dispatch, getState).then(
UserActions.autocompleteUsers(username, TeamStore.getCurrentId())(dispatch, getState).then(
(data) => {
if (success) {
success(data);
@@ -494,7 +494,7 @@ export function autocompleteUsersInTeam(username, success) {
}
export function autocompleteUsers(username, success) {
UserActions.autocomplete(username)(dispatch, getState).then(
UserActions.autocompleteUsers(username)(dispatch, getState).then(
(data) => {
if (success) {
success(data);