diff options
Diffstat (limited to 'app/assets/javascripts/components/actions')
-rw-r--r-- | app/assets/javascripts/components/actions/compose.jsx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx index 6d0188166..e11d1e537 100644 --- a/app/assets/javascripts/components/actions/compose.jsx +++ b/app/assets/javascripts/components/actions/compose.jsx @@ -54,10 +54,16 @@ export function cancelReplyCompose() { }; }; -export function mentionCompose(account) { - return { - type: COMPOSE_MENTION, - account: account +export function mentionCompose(account, router) { + return (dispatch, getState) => { + dispatch({ + type: COMPOSE_MENTION, + account: account + }); + + if (!getState().getIn(['compose', 'mounted'])) { + router.push('/statuses/new'); + } }; }; |