[SIS-xxx] upgrading to abstracto version supporting components v2

changing meetup and quote command responses to use components v2
changing column name of quote attachment
This commit is contained in:
Sheldan
2025-07-13 20:09:45 +02:00
parent 5f6df14c24
commit be35a84dcf
33 changed files with 248 additions and 171 deletions

View File

@@ -1,26 +1,66 @@
<#include "format_instant">
{
"embeds": [
"components": [
{
<#include "abstracto_color">,
"author": {
<#assign authorName><@default_template_if_null authorName "quote_response_default_author_name"/></#assign>
<#assign channelName><@default_template_if_null sourceChannelName "quote_response_default_channel_name"/></#assign>
"name": "<@safe_include "quote_response_header_author_name"/>"
<#if authorAvatarURL??>,"avatar": "${authorAvatarURL}"</#if>
},
<#assign quoteId=quoteId>
<#assign quoteDescription=quoteContent>
<#assign authorName><#if authorMemberDisplay?has_content>${authorMemberDisplay.name}<#elseif authorUserDisplay?has_content>${authorUserDisplay.name}<#else><@safe_include "quote_response_default_author_name"/></#if></#assign>
<#assign adderUserName><#if adderMemberDisplay?has_content>${adderMemberDisplay.name}<#elseif adderUserDisplay?has_content>${adderMemberDisplay.name}<#else><@safe_include "quote_response_default_adder_name"/></#if></#assign>
<#assign channelName><@default_template_if_null sourceChannelName "quote_response_default_channel_name"/></#assign>
<#assign creationDate><@format_instant_date_time instant=creationDate/></#assign>
"type": "textDisplay",
"content": "<@safe_include "quote_response_header_author_name"/>"
},
{
"type": "section",
"components": [
{
<#assign quoteId=quoteId>
"type": "textDisplay",
"content": "<@safe_include "quote_response_title"/>"
}
],
<#assign quoteJumpUrl=quotedMessage.jumpUrl>
"description": "<@safe_include "quote_response_description"/>",
"footer": {
<#assign adderUserName><@default_template_if_null adderName "quote_response_default_adder_name"/></#assign>
"text": "<@safe_include "quote_response_footer_adder_name" />"
<#if adderAvatarURL??>,"icon": "${adderAvatarURL}"</#if>
},
<#if imageAttachmentURLs?size = 1>
"imageUrl": "${imageAttachmentURLs[0]}",
"accessory": {
"type": "button",
"label": "<@safe_include "quote_response_jump_label"/>",
"url": "${quoteJumpUrl}",
"buttonStyle": "link"
}
},
{
"type": "container",
"components": [
<#assign hasContent=false>
<#if quoteContent?has_content>
<#assign hasContent=true>
{
"type": "textDisplay",
<#assign quoteDescription=quoteContent>
"content": "${quoteDescription}"
}
</#if>
"timeStamp": "${creationDate}"
<#if mediaAttachmentURLs?size gt 0>
<#assign hasContent=true>
,{
"type": "mediaGallery",
"images": [
<#list mediaAttachmentURLs as image>
{
"url": "${image}"
}<#sep>,</#list>
]
}
</#if>
<#if hasContent==false>
{
"type": "textDisplay",
"content": "<@safe_include "quote_response_no_content"/>"
}
</#if>
]
}
]
],
"messageConfig": {
"allowsUserMention": false,
"useComponentsV2": true
}
}