shithub: hell

Download patch

ref: 5c98f49d8a0818e711b76863bbcd2803fe440748
parent: 7c486cbfca36ab47bbb4b92985da39f5aea2da16
author: penny <penny@limitedideas.org>
date: Tue Sep 23 17:19:45 EDT 2025

Fix rm

--- a/main.go
+++ b/main.go
@@ -137,10 +137,10 @@
 				hc.pause(false)
 				return
 			case "rm":
-				deletefunc := func(job *GenericJob) {
-					err = client.DeleteStatus(context.Background(), (*recentpost).ID)
-				}
-				if index == "" && *recentpost != nil {
+				if foundindex && *recentpost != nil {
+					deletefunc := func(job *GenericJob) {
+						err = client.DeleteStatus(context.Background(), (*recentpost).ID)
+					}
 					deleteJob := hc.dispatchFunc(deletefunc)
 					deleteJob.Wait()
 					if err != nil {
@@ -152,6 +152,9 @@
 				if !postOK {
 					fmt.Println("No recent status to delete or post index not valid")
 					return
+				}
+				deletefunc := func(job *GenericJob) {
+					err = client.DeleteStatus(context.Background(), (*postItem).ID)
 				}
 				deleteJob := hc.dispatchFunc(deletefunc)
 				deleteJob.Wait()
--