From 34710a5497b3b097732817d692d48a54ad77414b Mon Sep 17 00:00:00 2001 From: Tejas1Koli Date: Thu, 12 Mar 2026 13:51:20 +0530 Subject: [PATCH] Fix indentation to use tabs --- pkg/channels/matrix/matrix.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/channels/matrix/matrix.go b/pkg/channels/matrix/matrix.go index f602cff09..649939889 100644 --- a/pkg/channels/matrix/matrix.go +++ b/pkg/channels/matrix/matrix.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "html" + "io" "mime" "net/url" "os" @@ -12,7 +13,6 @@ import ( "strings" "sync" "time" - "io" "github.com/gomarkdown/markdown" mdhtml "github.com/gomarkdown/markdown/html" @@ -732,7 +732,6 @@ func (c *MatrixChannel) downloadMedia( if err != nil { return "", err } - defer resp.Body.Close() data, err := io.ReadAll(io.LimitReader(resp.Body, int64(maxMediaSize)+1)) if err != nil { @@ -740,7 +739,7 @@ func (c *MatrixChannel) downloadMedia( } if len(data) > maxMediaSize { - return "", fmt.Errorf("media exceeds size limit of %d bytes", maxMediaSize) + return "", fmt.Errorf("media exceeds size limit of %d bytes", maxMediaSize) } // Encrypted attachments put URL in msgEvt.File and require client-side decryption.