Ignore embeds with no supported parts
This commit is contained in:
@@ -763,6 +763,10 @@ func (portal *Portal) handleDiscordEmbed(intent *appservice.IntentAPI, embed *di
|
|||||||
htmlParts = append(htmlParts, fmt.Sprintf(embedHTMLFooterOnlyDate, embedDateHTML))
|
htmlParts = append(htmlParts, fmt.Sprintf(embedHTMLFooterOnlyDate, embedDateHTML))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(htmlParts) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
compiledHTML := strings.Join(htmlParts, "")
|
compiledHTML := strings.Join(htmlParts, "")
|
||||||
if embed.Color != 0 {
|
if embed.Color != 0 {
|
||||||
compiledHTML = fmt.Sprintf(embedHTMLWrapperColor, embed.Color, compiledHTML)
|
compiledHTML = fmt.Sprintf(embedHTMLWrapperColor, embed.Color, compiledHTML)
|
||||||
|
|||||||
Reference in New Issue
Block a user