diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-03 22:04:58 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-03 22:04:58 +0200 |
commit | c288bf386cd14abc018a976771b9fb00741f99ac (patch) | |
tree | 6e8a3d00a16bdf7a5bf8cb2452a16b52f5b314d8 | |
parent | 718a12d2fc9c16f839735a8e238a01f3174be52e (diff) |
no need to prompt/store media content-type.
-rw-r--r-- | lisp/mastodon-toot.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 9d44bfd..de05287 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -1140,12 +1140,12 @@ text of the toot being replied to in the compose buffer." (mastodon-toot--refresh-attachments-display) (mastodon-toot--update-status-fields)) -(defun mastodon-toot--attach-media (file content-type description) - "Prompt for an attachment FILE of CONTENT-TYPE with DESCRIPTION. +(defun mastodon-toot--attach-media (file description) + "Prompt for an attachment FILE with DESCRIPTION. A preview is displayed in the new toot buffer, and the file is uploaded asynchronously using `mastodon-toot--upload-attached-media'. File is actually attached to the toot upon posting." - (interactive "fFilename: \nsContent type: \nsDescription: ") + (interactive "fFilename: \nsDescription: ") (when (>= (length mastodon-toot--media-attachments) 4) ;; Only a max. of 4 attachments are allowed, so pop the oldest one. (pop mastodon-toot--media-attachments)) @@ -1154,7 +1154,6 @@ File is actually attached to the toot upon posting." (setq mastodon-toot--media-attachments (nconc mastodon-toot--media-attachments `(((:contents . ,(mastodon-http--read-file-as-string file)) - (:content-type . ,content-type) (:description . ,description) (:filename . ,file))))) (mastodon-toot--refresh-attachments-display) @@ -1196,12 +1195,11 @@ which is used to attach it to a toot when posting." (when image-options 'imagemagick) nil) ; inbuilt scaling in 27.1 t image-options)) - (type (alist-get :content-type attachment)) (description (alist-get :description attachment))) (setq counter (1+ counter)) (list (format "\n %d: " counter) image - (format " \"%s\" (%s)" description type)))) + (format " \"%s\"" description)))) mastodon-toot--media-attachments)) (list "None"))) |