Explorar o código

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

Ayyan hai 4 meses
pai
achega
07914616af
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      cmd/messages_list.go

+ 1 - 0
cmd/messages_list.go

@@ -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()