Fix autocomplete and replying to flagged posts (#6690)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5627f3fd1d
Коммит
effaeee830
@@ -36,6 +36,7 @@ const dispatch = store.dispatch;
|
|||||||
const getState = store.getState;
|
const getState = store.getState;
|
||||||
import {removeUserFromTeam} from 'mattermost-redux/actions/teams';
|
import {removeUserFromTeam} from 'mattermost-redux/actions/teams';
|
||||||
import {viewChannel, getChannelStats, getMyChannelMember, getChannelAndMyMember} from 'mattermost-redux/actions/channels';
|
import {viewChannel, getChannelStats, getMyChannelMember, getChannelAndMyMember} from 'mattermost-redux/actions/channels';
|
||||||
|
import {getPostThread} from 'mattermost-redux/actions/posts';
|
||||||
|
|
||||||
export function emitChannelClickEvent(channel) {
|
export function emitChannelClickEvent(channel) {
|
||||||
function userVisitedFakeChannel(chan, success, fail) {
|
function userVisitedFakeChannel(chan, success, fail) {
|
||||||
@@ -158,17 +159,8 @@ export function emitCloseRightHandSide() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function emitPostFocusRightHandSideFromSearch(post, isMentionSearch) {
|
export function emitPostFocusRightHandSideFromSearch(post, isMentionSearch) {
|
||||||
Client.getPost(
|
getPostThread(post.id)(dispatch, getState).then(
|
||||||
post.channel_id,
|
() => {
|
||||||
post.id,
|
|
||||||
(data) => {
|
|
||||||
AppDispatcher.handleServerAction({
|
|
||||||
type: ActionTypes.RECEIVED_POSTS,
|
|
||||||
id: post.channel_id,
|
|
||||||
numRequested: 0,
|
|
||||||
post_list: data
|
|
||||||
});
|
|
||||||
|
|
||||||
AppDispatcher.handleServerAction({
|
AppDispatcher.handleServerAction({
|
||||||
type: ActionTypes.RECEIVED_POST_SELECTED,
|
type: ActionTypes.RECEIVED_POST_SELECTED,
|
||||||
postId: Utils.getRootId(post),
|
postId: Utils.getRootId(post),
|
||||||
@@ -182,9 +174,6 @@ export function emitPostFocusRightHandSideFromSearch(post, isMentionSearch) {
|
|||||||
results: null,
|
results: null,
|
||||||
is_mention_search: isMentionSearch
|
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) {
|
export function autocompleteUsersInChannel(username, channelId, success) {
|
||||||
const channel = ChannelStore.get(channelId);
|
const channel = ChannelStore.get(channelId);
|
||||||
const teamId = channel ? channel.team_id : TeamStore.getCurrentId();
|
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) => {
|
(data) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
success(data);
|
success(data);
|
||||||
@@ -484,7 +484,7 @@ export function autocompleteUsersInChannel(username, channelId, success) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function autocompleteUsersInTeam(username, success) {
|
export function autocompleteUsersInTeam(username, success) {
|
||||||
UserActions.autocomplete(username, TeamStore.getCurrentId())(dispatch, getState).then(
|
UserActions.autocompleteUsers(username, TeamStore.getCurrentId())(dispatch, getState).then(
|
||||||
(data) => {
|
(data) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
success(data);
|
success(data);
|
||||||
@@ -494,7 +494,7 @@ export function autocompleteUsersInTeam(username, success) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function autocompleteUsers(username, success) {
|
export function autocompleteUsers(username, success) {
|
||||||
UserActions.autocomplete(username)(dispatch, getState).then(
|
UserActions.autocompleteUsers(username)(dispatch, getState).then(
|
||||||
(data) => {
|
(data) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
success(data);
|
success(data);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user