[AB-220] fixing starboard posts using embeds without description

using the thumbnail of such an embed as attachment to the post
This commit is contained in:
Sheldan
2021-03-30 17:04:34 +02:00
parent 5a3dfa1e7c
commit 33daa5620e

View File

@@ -7,7 +7,7 @@
<#list message.embeds>
<@safe_include "starboard_post_embed_embeds_name"/>:
<#items as embed>
<@safe_include "starboard_post_embed_description"/>: ${embed.description?json_string} <#if embed.imageUrl?has_content> <@safe_include "starboard_post_embed_image_url"/>: ${embed.imageUrl} </#if>
<#if embed.description??> <@safe_include "starboard_post_embed_description"/>: ${embed.description?json_string} </#if> <#if embed.imageUrl?has_content> <@safe_include "starboard_post_embed_image_url"/>: ${embed.imageUrl} </#if>
</#items>
</#list>
",
@@ -25,6 +25,9 @@
<#if message.attachments?size gt 0>
,"imageUrl": "${message.attachments[0].proxyUrl}"
</#if>
<#if message.attachments?size = 0 && message.embeds?size gt 0>
,"imageUrl": "${message.embeds[0].cachedThumbnail.proxyUrl}"
</#if>
,"fields": [
{
"name": "<@safe_include "starboard_post_embed_original_field_title"/>"