MM-45193 Use context for channel logging (#20575)

Этот коммит содержится в:
Tim Scheuermann
2022-07-14 12:01:29 +03:00
коммит произвёл GitHub
родитель 5f4da3f308
Коммит 6dc897b04f
122 изменённых файлов: 2133 добавлений и 2082 удалений

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

@@ -4,6 +4,7 @@
package wsapi
import (
"github.com/mattermost/mattermost-server/v6/app/request"
"github.com/mattermost/mattermost-server/v6/model"
)
@@ -26,7 +27,7 @@ func (api *API) userTyping(req *model.WebSocketRequest) (map[string]any, *model.
return nil, NewInvalidWebSocketParamError(req.Action, "channel_id")
}
if !api.App.SessionHasPermissionToChannel(req.Session, channelId, model.PermissionCreatePost) {
if !api.App.SessionHasPermissionToChannel(request.EmptyContext(api.App.Log()), req.Session, channelId, model.PermissionCreatePost) {
return nil, NewInvalidWebSocketParamError(req.Action, "channel_id")
}