Fix slash command for post comment (#1221)

This commit is contained in:
Chris Duarte 2017-11-28 14:43:12 -08:00 committed by Harrison Healey
parent df61ec5552
commit e6869dd760
2 changed files with 6 additions and 4 deletions

View file

@ -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;

View file

@ -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(