aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-04 09:24:23 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-04 09:24:23 +0200
commit068a11c03e5605924eaf7357b79ba4719a3aa8c5 (patch)
tree35d860c3aef78278c012e06d60eb55710ee16c98 /lisp/mastodon-toot.el
parent59e5e3ece54bcac36d9debad392bff25a31438b5 (diff)
parentc288bf386cd14abc018a976771b9fb00741f99ac (diff)
Merge branch 'no-media-type' into develop
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el10
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index de6a5d4..52c7914 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1137,12 +1137,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))
@@ -1151,7 +1151,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)
@@ -1193,12 +1192,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")))