ref: 8fb4b04ad25350f33e2b047870da26563a581019
parent: 11e7b3f7e234f4a8dc18be318200d311b28e0304
author: penny <penny@limitedideas.org>
date: Tue Nov 4 14:26:01 EST 2025
clear those out from main too
--- a/main.go
+++ b/main.go
@@ -83,11 +83,9 @@
postItem, postOK = homeMap[lastindex]
}
- var reblogger *mastodon.Status
//Okay now see if the post we end up with is a reblog
if postOK { if postItem.Reblog != nil {- reblogger = postItem
postItem = postItem.Reblog
}
@@ -121,58 +119,6 @@
//Commands require status indexes
switch command {- case "view":
- err := hc.previewPostImages(postItem, hc.preferences.ImageViewer)
- if err != nil {- fmt.Printf("Image preview failed: %v\n", err)- }
- return
- case "import":
- err := hc.previewPostImages(postItem, hc.preferences.MediaImport)
- if err != nil {- fmt.Printf("Image preview failed: %v\n", err)- }
- return
- case "download":
- savePostImages(postItem, hc.preferences.Save_Location)
- return
- case "hrt":
- // We want to filter RTs from the RTer
- if reblogger != nil {- postItem = reblogger
- }
- account := accByNameOrRef()
- if account == nil {- fmt.Printf("Account lookup failed.\n")- return
- }
- relationships, err := hc.client.GetAccountRelationships(context.Background(), []string{string(account.ID)})- if err != nil {- fmt.Printf("Error loading relationship.\n")- return
- }
- relationship := relationships[0]
- if !relationship.Following {- fmt.Printf("can't filter rts from user you don't follow!\n")- return
- }
- if relationship.ShowingReblogs {- _, err := hc.client.AccountFollowDetailed(context.Background(), account.ID, true, relationship.Notifying)
- if err != nil {- fmt.Printf("Error updating settings\n")- return
- }
- fmt.Printf("No longer showing RTs from <%s>\n", account.Acct)- return
- }
- //Turn them back on if they were off!
- _, err = hc.client.AccountFollowDetailed(context.Background(), account.ID, false, relationship.Notifying)
- if err != nil {- fmt.Printf("Error updating settings\n")- return
- }
- fmt.Printf("Now showing RTs from <%s>\n", account.Acct)- return
case "rt":
rtfunc := func() {rtStatus, err := client.Reblog(context.Background(), postItem.ID)
--
⑨