aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-01-15 07:13:55 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-01-15 07:14:16 +0100
commit63edb7d5a2cae579d7e076398057e7a83cfa1888 (patch)
tree0baab3095283765ce3d011851e2a16df9215ce8f
parent480a1637007ff63792ae509f3659b2b7be2abb89 (diff)
toot--send: simplify edit-p check
-rw-r--r--lisp/mastodon-toot.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index bff6677..177cfdc 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -710,12 +710,11 @@ If media items have been attached and uploaded with
If `mastodon-toot--edit-toot-id' is non-nil, PUT contents to
instance to edit a toot."
(interactive)
- (let* ((edit-p (if mastodon-toot--edit-toot-id t nil))
- (toot (mastodon-toot--remove-docs))
+ (let* ((toot (mastodon-toot--remove-docs))
(scheduled mastodon-toot--scheduled-for)
(scheduled-id mastodon-toot--scheduled-id)
(endpoint
- (if edit-p
+ (if mastodon-toot--edit-toot-id
;; we are sending an edit:
(mastodon-http--api (format "statuses/%s"
mastodon-toot--edit-toot-id))
@@ -731,8 +730,8 @@ instance to edit a toot."
(symbol-name t)))
("spoiler_text" . ,spoiler)
("language" . ,mastodon-toot--language))
- ; Pleroma instances can't handle null-valued
- ; scheduled_at args, so only add if non-nil
+ ; Pleroma instances can't handle null-valued
+ ; scheduled_at args, so only add if non-nil
(when scheduled `(("scheduled_at" . ,scheduled)))))
(args-media (when mastodon-toot--media-attachments
(mastodon-http--build-array-params-alist
@@ -760,7 +759,7 @@ instance to edit a toot."
((mastodon-toot--empty-p)
(message "Empty toot. Cowardly refusing to post this."))
(t
- (let ((response (if edit-p
+ (let ((response (if mastodon-toot--edit-toot-id
;; we are sending an edit:
(mastodon-http--put endpoint args)
(mastodon-http--post endpoint args))))