Add support for MSC4193 media spoilers (#189)

This commit is contained in:
LeaPhant
2025-06-07 23:27:29 +02:00
committed by GitHub
parent a6fca7ce43
commit dc4538aab6
2 changed files with 14 additions and 7 deletions

View File

@@ -1639,6 +1639,10 @@ func (portal *Portal) handleMatrixMessage(sender *User, evt *event.Event) {
sendReq.Content, sendReq.AllowedMentions = portal.parseMatrixHTML(content)
}
if evt.Content.Raw["page.codeberg.everypizza.msc4193.spoiler"] == true {
filename = "SPOILER_" + filename
}
if portal.bridge.Config.Bridge.UseDiscordCDNUpload && !isWebhookSend && sess.IsUser {
att := &discordgo.MessageAttachment{
ID: "0",