ref: 2d617f3d1ca03d888c2cae2ea5b40d2d663abd0c
parent: e9c786524209de664b6dab56ccb581bca7df86eb
author: penny <penny@limitedideas.org>
date: Mon Nov 10 16:18:08 EST 2025
show replied to user in /cat
--- a/commands.go
+++ b/commands.go
@@ -772,7 +772,21 @@
cmd.bname = "cat"
cmd.bflags = status | templater
cmd.doer = func(data *cmddata) string {- line, _ := data.templater.render("$index $display_name $username_full $content $media_descriptions\n$detail_line")+ replyLine := ""
+ if data.status.InReplyToAccountID != 0 {+ var account *mastodon.Account
+ var err error
+ getaccount := func() {+ ID := mastodon.ID(data.status.InReplyToAccountID.(string))
+ account, err = hc.client.GetAccount(context.Background(), ID)
+ }
+ hc.dispatchAnon(getaccount).Wait()
+ if err == nil {+ replyLine = fmt.Sprintf("Reply to %s\n", account.Acct)+ }
+ }
+ renderLine := fmt.Sprintf("$index $display_name $username_full $content $media_descriptions\n%s$detail_line", replyLine)+ line, _ := data.templater.render(renderLine)
return fmt.Sprint(line)
}
return cmd
--- a/todo.md
+++ b/todo.md
@@ -20,7 +20,6 @@
- [ ] Next won’t take you past the last page
- [ ] Show profile fields
- [ ] Thread loader gets the top parent then reloads
- - [ ] Thread context in /cat
- [ ] /Refresh: try to pull more data for a page
- [ ] automatically pause on long lined edits
- [ ] fix markdown/parameters for edit
@@ -28,6 +27,7 @@
- [ ] authorize oauth tokens
- [ ] plaintext => self authorize oauth
- [ ] -h and -w to specify size of output
+ - [x] Thread context in /cat
- [x] label hellclient
- [x] display name in /cat
- [x] Print statuses from myself even when paused!
--
⑨