From 694733a4e9e46b26f98a9d034115b13879af8fd0 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 29 Jan 2023 23:26:58 +0200 Subject: [PATCH] Don't specify width in inline images They don't necessarily need to be square, so only specify height and let clients make the width fit automatically. --- commands.go | 2 +- portal.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands.go b/commands.go index 52da8b0..2340f87 100644 --- a/commands.go +++ b/commands.go @@ -353,7 +353,7 @@ func fnListGuilds(ce *WrappedCommandEvent) { } var avatarHTML string if !guild.AvatarURL.IsEmpty() { - avatarHTML = fmt.Sprintf(` `, guild.AvatarURL.String()) + avatarHTML = fmt.Sprintf(` `, guild.AvatarURL.String()) } items = append(items, fmt.Sprintf("
  • %s%s (%s) - %s
  • ", avatarHTML, html.EscapeString(guild.Name), guild.ID, status)) } diff --git a/portal.go b/portal.go index 2fd96f7..3112447 100644 --- a/portal.go +++ b/portal.go @@ -740,7 +740,7 @@ func (portal *Portal) handleDiscordVideoEmbed(intent *appservice.IntentAPI, embe const ( embedHTMLWrapper = `
    %s
    ` embedHTMLWrapperColor = `
    %s
    ` - embedHTMLAuthorWithImage = `

     %s

    ` + embedHTMLAuthorWithImage = `

     %s

    ` embedHTMLAuthorPlain = `

    %s

    ` embedHTMLAuthorLink = `%s` embedHTMLTitleWithLink = `

    %s

    ` @@ -751,7 +751,7 @@ const ( embedHTMLFields = `%s%s
    ` embedHTMLLinearField = `

    %s
    %s

    ` embedHTMLImage = `

    ` - embedHTMLFooterWithImage = `` + embedHTMLFooterWithImage = `` embedHTMLFooterPlain = `` embedHTMLFooterOnlyDate = `` embedHTMLDate = ``