diff options
author | marty hiatt <martianhiatus@riseup.net> | 2023-12-18 21:50:59 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2023-12-18 21:50:59 +0100 |
commit | ee33bd1d2d4f095fe77b26246a71270ef533e735 (patch) | |
tree | b569716c69bf2ee11823c85a5c09daff28e8850c /lisp/mastodon-toot.el | |
parent | c9c9487968c7c03fbeac3fe67d5699961d030fa8 (diff) |
toot--send: check for media with media-attachment-ids for speed
media-attachments contains image data, so is slow.
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 7833e47..266fa86 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -842,20 +842,20 @@ instance to edit a toot." ;; 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 + (args-media (when mastodon-toot--media-attachment-ids (mastodon-http--build-array-params-alist "media_ids[]" mastodon-toot--media-attachment-ids))) (args-poll (when mastodon-toot-poll (mastodon-toot--build-poll-params))) ;; media || polls: - (args (if mastodon-toot--media-attachments + (args (if mastodon-toot--media-attachment-ids (append args-media args-no-media) (if mastodon-toot-poll (append args-no-media args-poll) args-no-media))) (prev-window-config mastodon-toot-previous-window-config)) - (cond ((and mastodon-toot--media-attachments + (cond ((and mastodon-toot--media-attachment-ids ;; make sure we have media args ;; and the same num of ids as attachments (or (not args-media) |