fix dm custom slash command regression (#7008)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
6418e912df
Коммит
e5e450fc09
@@ -212,7 +212,13 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
commandArgs.TeamId = channel.TeamId
|
if commandArgs.TeamId == "" {
|
||||||
|
commandArgs.TeamId = channel.TeamId
|
||||||
|
} else if c.Session.GetTeamByTeamId(commandArgs.TeamId) == nil {
|
||||||
|
c.SetPermissionError(model.PERMISSION_USE_SLASH_COMMANDS)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
commandArgs.UserId = c.Session.UserId
|
commandArgs.UserId = c.Session.UserId
|
||||||
commandArgs.T = c.T
|
commandArgs.T = c.T
|
||||||
commandArgs.Session = c.Session
|
commandArgs.Session = c.Session
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import UserStore from 'stores/user_store.jsx';
|
|||||||
import PostDeletedModal from './post_deleted_modal.jsx';
|
import PostDeletedModal from './post_deleted_modal.jsx';
|
||||||
import PostStore from 'stores/post_store.jsx';
|
import PostStore from 'stores/post_store.jsx';
|
||||||
import PreferenceStore from 'stores/preference_store.jsx';
|
import PreferenceStore from 'stores/preference_store.jsx';
|
||||||
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import MessageHistoryStore from 'stores/message_history_store.jsx';
|
import MessageHistoryStore from 'stores/message_history_store.jsx';
|
||||||
import Textbox from './textbox.jsx';
|
import Textbox from './textbox.jsx';
|
||||||
import MsgTyping from './msg_typing.jsx';
|
import MsgTyping from './msg_typing.jsx';
|
||||||
@@ -199,6 +200,7 @@ export default class CreateComment extends React.Component {
|
|||||||
|
|
||||||
const args = {};
|
const args = {};
|
||||||
args.channel_id = this.props.channelId;
|
args.channel_id = this.props.channelId;
|
||||||
|
args.team_id = TeamStore.getCurrentId();
|
||||||
args.root_id = this.props.rootId;
|
args.root_id = this.props.rootId;
|
||||||
args.parent_id = this.props.rootId;
|
args.parent_id = this.props.rootId;
|
||||||
ChannelActions.executeCommand(
|
ChannelActions.executeCommand(
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import PostStore from 'stores/post_store.jsx';
|
|||||||
import MessageHistoryStore from 'stores/message_history_store.jsx';
|
import MessageHistoryStore from 'stores/message_history_store.jsx';
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
import PreferenceStore from 'stores/preference_store.jsx';
|
import PreferenceStore from 'stores/preference_store.jsx';
|
||||||
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import ConfirmModal from './confirm_modal.jsx';
|
import ConfirmModal from './confirm_modal.jsx';
|
||||||
|
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
@@ -151,6 +152,7 @@ export default class CreatePost extends React.Component {
|
|||||||
|
|
||||||
const args = {};
|
const args = {};
|
||||||
args.channel_id = this.state.channelId;
|
args.channel_id = this.state.channelId;
|
||||||
|
args.team_id = TeamStore.getCurrentId();
|
||||||
ChannelActions.executeCommand(
|
ChannelActions.executeCommand(
|
||||||
post.message,
|
post.message,
|
||||||
args,
|
args,
|
||||||
@@ -466,6 +468,7 @@ export default class CreatePost extends React.Component {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const args = {};
|
const args = {};
|
||||||
args.channel_id = this.state.channelId;
|
args.channel_id = this.state.channelId;
|
||||||
|
args.team_id = TeamStore.getCurrentId();
|
||||||
ChannelActions.executeCommand(
|
ChannelActions.executeCommand(
|
||||||
'/shortcuts',
|
'/shortcuts',
|
||||||
args,
|
args,
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user