Cleans RemoteId when sanitizing post input from the API (#27049)

* Cleans RemoteId when sanitizing post input from the API

* Fix require check

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Miguel de la Cruz
2024-05-23 14:29:19 +02:00
коммит произвёл GitHub
родитель f0601b67e8
Коммит cd81b199b7
3 изменённых файлов: 25 добавлений и 2 удалений

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

@@ -55,8 +55,7 @@ func createPost(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
// Strip away delete_at if passed
post.DeleteAt = 0
post.SanitizeInput()
post.UserId = c.AppContext.Session().UserId