[MM-26398] Remove deprecated model.CommandArgs.Session (#22815)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a0530da22b
Коммит
4cc370098e
@@ -19,9 +19,6 @@ type CommandArgs struct {
|
|||||||
T i18n.TranslateFunc `json:"-"`
|
T i18n.TranslateFunc `json:"-"`
|
||||||
UserMentions UserMentionMap `json:"-"`
|
UserMentions UserMentionMap `json:"-"`
|
||||||
ChannelMentions ChannelMentionMap `json:"-"`
|
ChannelMentions ChannelMentionMap `json:"-"`
|
||||||
|
|
||||||
// DO NOT USE Session field is deprecated. MM-26398
|
|
||||||
Session Session `json:"-"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *CommandArgs) Auditable() map[string]interface{} {
|
func (o *CommandArgs) Auditable() map[string]interface{} {
|
||||||
|
|||||||
@@ -353,7 +353,6 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
commandArgs.UserId = c.AppContext.Session().UserId
|
commandArgs.UserId = c.AppContext.Session().UserId
|
||||||
commandArgs.T = c.AppContext.T
|
commandArgs.T = c.AppContext.T
|
||||||
commandArgs.SiteURL = c.GetSiteURLHeader()
|
commandArgs.SiteURL = c.GetSiteURLHeader()
|
||||||
commandArgs.Session = *c.AppContext.Session()
|
|
||||||
|
|
||||||
response, err := c.App.ExecuteCommand(c.AppContext, &commandArgs)
|
response, err := c.App.ExecuteCommand(c.AppContext, &commandArgs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -424,7 +423,6 @@ func listCommandAutocompleteSuggestions(c *Context, w http.ResponseWriter, r *ht
|
|||||||
RootId: query.Get("root_id"),
|
RootId: query.Get("root_id"),
|
||||||
UserId: c.AppContext.Session().UserId,
|
UserId: c.AppContext.Session().UserId,
|
||||||
T: c.AppContext.T,
|
T: c.AppContext.T,
|
||||||
Session: *c.AppContext.Session(),
|
|
||||||
SiteURL: c.GetSiteURLHeader(),
|
SiteURL: c.GetSiteURLHeader(),
|
||||||
Command: userInput,
|
Command: userInput,
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user