From ef8b188fa9fc5e4ea4650c983bd4676b5c4614ea Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Wed, 2 Aug 2023 18:49:28 -0400 Subject: [PATCH] raw sendmsg from command line --- honk.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/honk.go b/honk.go index 403c3de..8466c67 100644 --- a/honk.go +++ b/honk.go @@ -433,6 +433,22 @@ func main() { return } unfollowyou(user, honkerid, true) + case "sendmsg": + if len(args) < 4 { + fmt.Printf("usage: honk send username filename rcpt\n") + return + } + user, err := butwhatabout(args[1]) + if err != nil { + fmt.Printf("user not found\n") + return + } + data, err := os.ReadFile(args[2]) + if err != nil { + fmt.Printf("can't read file\n") + return + } + deliverate(user.ID, args[3], data) case "cleanup": arg := "30" if len(args) > 1 {