shithub: hell

Download patch

ref: f66be6e662ba62d5d21e4e4adb182bb9f398e4fe
parent: 33dcfcd19bd18f4379384fba8a898b12402def78
author: penny <penny@limitedideas.org>
date: Tue Oct 14 09:52:28 EDT 2025

add ?html hint and help info

--- a/filehandler.go
+++ b/filehandler.go
@@ -44,19 +44,17 @@
 func (hc *Hellclient) previewPostImages(target *mastodon.Status, commandstring string) (err error) {
 	//Let go of the lock while we wait for return
 	hc.unlock()
+	defer hc.lock()
 	_, pathnames, err := downloadPostImages(target)
 
 	if len(pathnames) == 0 {
 		//We tolerate failing to download some items but if we have none then error out
-		hc.lock()
 		return
 	}
 	for _, path := range pathnames {
 		go openItemInOS(commandstring, path)
 	}
-	hc.lock()
 	return
-
 }
 
 func savePostImages(target *mastodon.Status, savedir string) error {
--- a/help.go
+++ b/help.go
@@ -68,6 +68,8 @@
   ?direct                      Set status visibility direct (as in direct message).
   ?subject="your subject"      Set the subject (Content Warning) to argument in quotes.
   ?sensitive                   Mark status material as sensitive.
+  ?markdown                    Sets post content_type. Only for supported servers.
+  ?html                        Sets post content_type. Only for supported servers.
 `
 	return fmt.Sprintf(helpstring, configpath)
 }
--- a/mastodon.go
+++ b/mastodon.go
@@ -97,8 +97,10 @@
 			}
 		case "sensitive":
 			toot.Sensitive = true
-			case "markdown":
+		case "markdown":
 			toot.ContentType = "text/markdown"
+		case "html":
+			toot.ContentType = "text/html"
 		}
 	}
 	*postpointer = posttext
--