Fix slash command for post comment (#1221)
This commit is contained in:
parent
df61ec5552
commit
e6869dd760
2 changed files with 6 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue