Sanitize post for audit with preview links (#23745)
* sanitize post for audit with preview links * add unit test --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -23,3 +23,11 @@ type PostEmbed struct {
|
||||
// Any additional data for the embedded content. Only used for OpenGraph embeds.
|
||||
Data any `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func (pe *PostEmbed) Auditable() map[string]any {
|
||||
// filter out embedded content.
|
||||
return map[string]any{
|
||||
"type": pe.Type,
|
||||
"url": pe.URL,
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user