[AB-xxx] fixing template for message embed and starboard post for embedded messages

This commit is contained in:
Sheldan
2026-06-14 14:24:03 +02:00
parent 1b99cf1c63
commit 2820528ffc
2 changed files with 6 additions and 2 deletions

View File

@@ -37,7 +37,7 @@
</#if> </#if>
<#list embeddedMessage.embeds as embed> <#list embeddedMessage.embeds as embed>
<#if embed.description?has_content> <#if embed.description?has_content>
<#if embeddedMessage.content?has_content>,</#if> <#if hasContent>,</#if>
<#if (embed.cachedImageInfo?has_content && embed.cachedImageInfo.proxyUrl?has_content) || (embed.cachedThumbnail?has_content && embed.cachedThumbnail.proxyUrl?has_content)> <#if (embed.cachedImageInfo?has_content && embed.cachedImageInfo.proxyUrl?has_content) || (embed.cachedThumbnail?has_content && embed.cachedThumbnail.proxyUrl?has_content)>
{ {
<#assign hasContent=true> <#assign hasContent=true>
@@ -62,6 +62,7 @@
<#assign hasContent=true> <#assign hasContent=true>
<#elseif (embed.cachedImageInfo?has_content && embed.cachedImageInfo.proxyUrl?has_content && embed.cachedImageInfo.width gt 0) <#elseif (embed.cachedImageInfo?has_content && embed.cachedImageInfo.proxyUrl?has_content && embed.cachedImageInfo.width gt 0)
|| (embed.cachedThumbnail?has_content && embed.cachedThumbnail.proxyUrl?has_content && embed.cachedThumbnail.width gt 0)> || (embed.cachedThumbnail?has_content && embed.cachedThumbnail.proxyUrl?has_content && embed.cachedThumbnail.width gt 0)>
<#if hasContent>,</#if>
<#assign hasContent=true> <#assign hasContent=true>
{ {
"type": "mediaGallery", "type": "mediaGallery",

View File

@@ -46,13 +46,15 @@
</#if> </#if>
<#list message.embeds as embed> <#list message.embeds as embed>
<#if embed.description?has_content && !((embed.cachedImageInfo?has_content && embed.cachedImageInfo.proxyUrl?has_content) || (embed.cachedThumbnail?has_content && embed.cachedThumbnail.proxyUrl?has_content))> <#if embed.description?has_content && !((embed.cachedImageInfo?has_content && embed.cachedImageInfo.proxyUrl?has_content) || (embed.cachedThumbnail?has_content && embed.cachedThumbnail.proxyUrl?has_content))>
<#if hasContent>,</#if>
<#assign hasContent=true> <#assign hasContent=true>
<#if message.content?has_content>,</#if>{ {
"type": "textDisplay", "type": "textDisplay",
"content": "${embed.description?json_string}" "content": "${embed.description?json_string}"
} }
<#elseif embed.description?has_content && (embed.cachedImageInfo?has_content && embed.cachedImageInfo.proxyUrl?has_content && embed.cachedImageInfo.width gt 0) <#elseif embed.description?has_content && (embed.cachedImageInfo?has_content && embed.cachedImageInfo.proxyUrl?has_content && embed.cachedImageInfo.width gt 0)
|| (embed.cachedThumbnail?has_content && embed.cachedThumbnail.proxyUrl?has_content && embed.cachedThumbnail.width gt 0)> || (embed.cachedThumbnail?has_content && embed.cachedThumbnail.proxyUrl?has_content && embed.cachedThumbnail.width gt 0)>
<#if hasContent>,</#if>
<#assign hasContent=true> <#assign hasContent=true>
,{ ,{
"type": "section", "type": "section",
@@ -69,6 +71,7 @@
} }
<#elseif (embed.cachedImageInfo?has_content && embed.cachedImageInfo.proxyUrl?has_content && embed.cachedImageInfo.width gt 0) <#elseif (embed.cachedImageInfo?has_content && embed.cachedImageInfo.proxyUrl?has_content && embed.cachedImageInfo.width gt 0)
|| (embed.cachedThumbnail?has_content && embed.cachedThumbnail.proxyUrl?has_content && embed.cachedThumbnail.width gt 0)> || (embed.cachedThumbnail?has_content && embed.cachedThumbnail.proxyUrl?has_content && embed.cachedThumbnail.width gt 0)>
<#if hasContent>,</#if>
<#assign hasContent=true> <#assign hasContent=true>
{ {
"type": "mediaGallery", "type": "mediaGallery",