[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>
<#list embeddedMessage.embeds as embed>
<#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)>
{
<#assign hasContent=true>
@@ -62,6 +62,7 @@
<#assign hasContent=true>
<#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)>
<#if hasContent>,</#if>
<#assign hasContent=true>
{
"type": "mediaGallery",

View File

@@ -46,13 +46,15 @@
</#if>
<#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 hasContent>,</#if>
<#assign hasContent=true>
<#if message.content?has_content>,</#if>{
{
"type": "textDisplay",
"content": "${embed.description?json_string}"
}
<#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)>
<#if hasContent>,</#if>
<#assign hasContent=true>
,{
"type": "section",
@@ -69,6 +71,7 @@
}
<#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)>
<#if hasContent>,</#if>
<#assign hasContent=true>
{
"type": "mediaGallery",