[MM-50516] Support multiple embed (#22337)

Этот коммит содержится в:
Konstantinos Pittas
2023-02-23 17:50:23 +02:00
коммит произвёл GitHub
родитель d44065d4b3
Коммит e0bc2d44a4

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

@@ -216,7 +216,9 @@ func (a *App) SanitizePostMetadataForUser(c request.CTX, post *model.Post, userI
} }
if previewedChannel != nil && !a.HasPermissionToReadChannel(c, userID, previewedChannel) { if previewedChannel != nil && !a.HasPermissionToReadChannel(c, userID, previewedChannel) {
post.Metadata.Embeds[0].Data = nil for _, embed := range post.Metadata.Embeds {
embed.Data = nil
}
} }
return post, nil return post, nil