diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-06-20 08:56:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-20 08:56:38 -0400 |
commit | effaeee830efa78cd15218f6ba3920031ff8a5c1 (patch) | |
tree | 16d46b37bf6546f3f5fa5b2f509e3190ddcb98db /webapp/actions/global_actions.jsx | |
parent | 5627f3fd1d315e1574a444daba36aee592f1c7b5 (diff) | |
download | chat-effaeee830efa78cd15218f6ba3920031ff8a5c1.tar.gz chat-effaeee830efa78cd15218f6ba3920031ff8a5c1.tar.bz2 chat-effaeee830efa78cd15218f6ba3920031ff8a5c1.zip |
Fix autocomplete and replying to flagged posts (#6690)
Diffstat (limited to 'webapp/actions/global_actions.jsx')
-rw-r--r-- | webapp/actions/global_actions.jsx | 17 |
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'); } ); } |