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 удалений

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

@@ -488,6 +488,12 @@ func (o *Post) SanitizeProps() {
}
}
// Remove any input data from the post object that is not user controlled
func (o *Post) SanitizeInput() {
o.DeleteAt = 0
o.RemoteId = NewString("")
}
func (o *Post) ContainsIntegrationsReservedProps() []string {
return containsIntegrationsReservedProps(o.GetProps())
}