diff --git a/app/actions/views/command.js b/app/actions/views/command.js index b55cac402..fd882bb98 100644 --- a/app/actions/views/command.js +++ b/app/actions/views/command.js @@ -4,7 +4,7 @@ import {executeCommand as executeCommandService} from 'mattermost-redux/actions/integrations'; import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams'; -export function executeCommand(message, channelId) { +export function executeCommand(message, channelId, rootId) { return async (dispatch, getState) => { const state = getState(); @@ -12,7 +12,9 @@ export function executeCommand(message, channelId) { const args = { channel_id: channelId, - team_id: teamId + team_id: teamId, + root_id: rootId, + parent_id: rootId }; let msg = message; diff --git a/app/components/post_textbox/post_textbox.js b/app/components/post_textbox/post_textbox.js index 5b1a76a74..638923395 100644 --- a/app/components/post_textbox/post_textbox.js +++ b/app/components/post_textbox/post_textbox.js @@ -342,8 +342,8 @@ class PostTextbox extends PureComponent { }; sendCommand = async (msg) => { - const {actions, channelId, intl} = this.props; - const {error} = await actions.executeCommand(msg, channelId); + const {actions, channelId, intl, rootId} = this.props; + const {error} = await actions.executeCommand(msg, channelId, rootId); if (error) { Alert.alert(