MM-22706: pass along set_online flag in websocket response (#14591)
* MM-22706: pass along set_online flag in websocket response To let the client know whether a user has created a post without being online or not, we get the set_online query param and pass it down to the websocket event being passed down to the client. With this PR, the "data" field of the `posted` event will contain a `set_online` boolean field set to true/false depending on the query_param set_online value set in the createPost call. * Setting to false for auto responder Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b9309b2af1
Коммит
14f7118dde
@@ -57,7 +57,7 @@ func (a *App) CreateBot(bot *model.Bot) (*model.Bot, *model.AppError) {
|
||||
Message: T("api.bot.teams_channels.add_message_mobile"),
|
||||
}
|
||||
|
||||
if _, err := a.CreatePostAsUser(botAddPost, a.Session().Id); err != nil {
|
||||
if _, err := a.CreatePostAsUser(botAddPost, a.Session().Id, true); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
@@ -342,7 +342,7 @@ func (a *App) notifySysadminsBotOwnerDeactivated(userId string) *model.AppError
|
||||
Type: model.POST_SYSTEM_GENERIC,
|
||||
}
|
||||
|
||||
_, appErr = a.CreatePost(post, channel, false)
|
||||
_, appErr = a.CreatePost(post, channel, false, true)
|
||||
if appErr != nil {
|
||||
return appErr
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user