summaryrefslogtreecommitdiffstats
path: root/webapp/actions/global_actions.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/actions/global_actions.jsx')
-rw-r--r--webapp/actions/global_actions.jsx17
1 files changed, 3 insertions, 14 deletions
diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx
index 13d74c845..9fb856081 100644
--- a/webapp/actions/global_actions.jsx
+++ b/webapp/actions/global_actions.jsx
@@ -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');
}
);
}