MM-45195: Use api4/bot and app/bot to use logger context (#20729)

https://mattermost.atlassian.net/browse/MM-45195

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-08-01 13:48:45 +05:30
коммит произвёл GitHub
родитель c7ae090dad
Коммит 55f64195b1
7 изменённых файлов: 27 добавлений и 27 удалений

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

@@ -46,7 +46,7 @@ func (s *postServiceWrapper) CreatePost(ctx *request.Context, post *model.Post)
return s.app.CreatePostMissingChannel(ctx, post, true)
}
func (a *App) CreatePostAsUser(c *request.Context, post *model.Post, currentSessionId string, setOnline bool) (*model.Post, *model.AppError) {
func (a *App) CreatePostAsUser(c request.CTX, post *model.Post, currentSessionId string, setOnline bool) (*model.Post, *model.AppError) {
// Check that channel has not been deleted
channel, errCh := a.Srv().Store.Channel().Get(post.ChannelId, true)
if errCh != nil {
@@ -83,7 +83,7 @@ func (a *App) CreatePostAsUser(c *request.Context, post *model.Post, currentSess
isCRTReply := post.RootId != "" && a.IsCRTEnabledForUser(c, post.UserId)
if !fromWebhook && !fromBot && !isCRTReply {
if _, err := a.MarkChannelsAsViewed(c, []string{post.ChannelId}, post.UserId, currentSessionId, true); err != nil {
mlog.Warn(
c.Logger().Warn(
"Encountered error updating last viewed",
mlog.String("channel_id", post.ChannelId),
mlog.String("user_id", post.UserId),