shithub: hell

Download patch

ref: cd918bb04cfef7e4513e46adb37f731b70310ed0
parent: 1f9c3096bcb8ed4f78f701236f891f7151a65ae7
author: penny <penny@limitedideas.org>
date: Mon Oct 20 16:14:52 EDT 2025

add support for viewing DM timeline

--- a/help.go
+++ b/help.go
@@ -23,7 +23,9 @@
                                Opens the configured graphical file picker if no path is given.
                                
   /detach                      Clears loaded but unposted attachments.
-  /dm <content>                Create a status with direct visibility (e.g. a dm).
+  /dm [content]                Create a status with direct visibility (e.g. a dm).
+                               No arguments opens DM page
+                               
   /rt <index>                  Boost a status by index.
   /parent <index>              View parent of status by index.
   /rm [index]                  Delete status by index
--- a/main.go
+++ b/main.go
@@ -234,6 +234,17 @@
 					fmt.Println(err)
 				}
 				return
+			case "dm":
+				if arguments != "" {
+					hc.dispatchStatus(arguments, "direct")
+					return
+				}
+				hc.page = &Page{}
+				getter := &BasicStatusGetter{getter: hc.client.GetTimelineDirect}
+				hc.page.loader = &StatusPages{hc: hc, getter: getter}
+				fmt.Print(hc.page.String())
+				hc.pause(true)
+				return
 			}
 
 			if arguments == "" && !postOK {
@@ -243,9 +254,6 @@
 
 			//Commands that don't take an index
 			switch command {
-			case "dm":
-				hc.dispatchStatus(arguments, "direct")
-				return
 			}
 
 			//Commands that accept debug indexes
--