shithub: hell

Download patch

ref: fcbf583757022a4a93046f846f122955c8e2cee4
parent: dcdbb038d40559fc72379357890a52abd8a926d3
author: penny <penny@limitedideas.org>
date: Mon Oct 27 16:46:59 EDT 2025

don't reply to myself when replying to user replying to me

--- a/main.go
+++ b/main.go
@@ -33,15 +33,16 @@
 	for {
 		func() {
 			line, err := rl.Readline()
-			if err != nil {
-				return
-			}
 
 			command, arguments, found := processInput(line)
 
 			//empty line
-			if command == "" && arguments == "" {
+			if command == "" && arguments == "" && err == nil {
 				hc.togglepause()
+				return
+			}
+
+			if command == "" && arguments == "" && err != nil {
 				return
 			}
 
--- a/mastodon.go
+++ b/mastodon.go
@@ -121,7 +121,9 @@
 	}
 
 	for user := range postItem.Mentions {
-		sb.WriteString(fmt.Sprintf("@%s ", postItem.Mentions[user].Acct))
+		if currentuser != postItem.Mentions[user].ID {
+			sb.WriteString(fmt.Sprintf("@%s ", postItem.Mentions[user].Acct))
+		}
 	}
 
 	sb.WriteString(posttext)
--