fix(messages_list): prevent panic on failed attachment download (#660)

This commit is contained in:
Ayyan 2025-12-11 14:02:24 -08:00 • committed by GitHub
parent 73f8ccaba6
commit 07914616af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -497,6 +497,7 @@ func (ml *messagesList) openAttachment(attachment discord.Attachment) {
resp, err := http.Get(attachment.URL)
if err != nil {
slog.Error("failed to fetch the attachment", "err", err, "url", attachment.URL)
return
}
defer resp.Body.Close()