shithub: hell

Download patch

ref: fb03a54c8c64b1b4ffa3eef74819443ad07f2384
parent: 0b3dee53faea192fd49509879c447eebe68a4fe3
author: penny <penny@limitedideas.org>
date: Sat Nov 8 15:41:17 EST 2025

fix failed attachment crash

--- a/filehandler.go
+++ b/filehandler.go
@@ -185,10 +185,10 @@
 	description, _ := sam.rl.ReadLineWithConfig(config)
 	media := &mastodon.Media{File: file, Description: description}
 	attachment, err := sam.client.UploadMediaFromMedia(context.Background(), media)
-	sam.attachments = append(sam.attachments, attachment)
 	if err != nil {
 		return err
 	}
+	sam.attachments = append(sam.attachments, attachment)
 	return nil
 }
 
--