* Use flags for create post

* Remove unintended file

* Fix unintended change and types

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Daniel Espino García
2024-10-22 16:00:26 +02:00
коммит произвёл GitHub
родитель 43a06d1b78
Коммит 2d96053012
31 изменённых файлов: 293 добавлений и 288 удалений

Просмотреть файл

@@ -136,7 +136,7 @@ func (a *App) SendReportToUser(rctx request.CTX, job *model.Job, format string)
FileIds: []string{fileInfo.Id},
}
_, err = a.CreatePost(rctx, post, channel, false, true)
_, err = a.CreatePost(rctx, post, channel, model.CreatePostFlags{SetOnline: true})
return err
}
@@ -250,7 +250,7 @@ func (a *App) StartUsersBatchExport(rctx request.CTX, ro *model.UserReportOption
UserId: systemBot.UserId,
}
if _, err := a.CreatePost(rctx, post, channel, false, true); err != nil {
if _, err := a.CreatePost(rctx, post, channel, model.CreatePostFlags{SetOnline: true}); err != nil {
rctx.Logger().Error("Failed to post batch export message", mlog.Err(err))
}
})