mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-07-06 20:47:18 +00:00
[AB-xxx] fixing template for message embed and starboard post for embedded messages
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user