diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-08-02 21:31:59 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-08-03 09:55:11 +0200 |
commit | 6dda2522d2a5ea57f88898e0f043760e68c7309d (patch) | |
tree | 1cb07fd6b539f257b3f429f7cbb7b701058a02a6 /lisp/mastodon-views.el | |
parent | 731f7b5295e7169f51b2cebf767bb3acefbcda96 (diff) |
toot: attach-media: get max attachments from instance, y-or-n-p
views: get-own-instance (for max attachs)
Diffstat (limited to 'lisp/mastodon-views.el')
-rw-r--r-- | lisp/mastodon-views.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 775b96b..e956ccd 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -738,6 +738,11 @@ If INSTANCE is given, use that." (string-remove-suffix (concat "/@" username) url)))) +(defun mastodon-views--get-own-instance () + "Return JSON of `mastodon-active-user's instance." + (mastodon-http--get-json + (mastodon-http--api "instance" "v2") nil nil :vector)) + (defun mastodon-views--view-instance-description (&optional user brief instance misskey) "View the details of the instance the current post's author is on. @@ -747,8 +752,7 @@ INSTANCE is an instance domain name. MISSKEY means the instance is a Misskey or derived server." (interactive) (if user - (let ((response (mastodon-http--get-json - (mastodon-http--api "instance" "v2") nil nil :vector))) + (let ((response (mastodon-views--get-own-instance))) (mastodon-views--instance-response-fun response brief instance)) (mastodon-tl--do-if-item (let* ((toot (if (mastodon-tl--profile-buffer-p) |