aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/mastodon-http.el7
-rw-r--r--lisp/mastodon-views.el2
2 files changed, 5 insertions, 4 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 49c94a4..7ef6f77 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -47,10 +47,11 @@
(defconst mastodon-http--timeout 15
"HTTP request timeout, in seconds. Has no effect on Emacs < 26.1.")
-(defun mastodon-http--api (endpoint)
- "Return Mastodon API URL for ENDPOINT."
+(defun mastodon-http--api (endpoint &optional version)
+ "Return Mastodon API URL for ENDPOINT.
+Optionally specify VERSION in format vX."
(concat mastodon-instance-url "/api/"
- mastodon-http--api-version "/" endpoint))
+ (or version mastodon-http--api-version) "/" endpoint))
(defun mastodon-http--api-search ()
"Return Mastodon API url for the /search endpoint (v2)."
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el
index e9e89c0..775b96b 100644
--- a/lisp/mastodon-views.el
+++ b/lisp/mastodon-views.el
@@ -748,7 +748,7 @@ MISSKEY means the instance is a Misskey or derived server."
(interactive)
(if user
(let ((response (mastodon-http--get-json
- (mastodon-http--api "instance") nil nil :vector)))
+ (mastodon-http--api "instance" "v2") nil nil :vector)))
(mastodon-views--instance-response-fun response brief instance))
(mastodon-tl--do-if-item
(let* ((toot (if (mastodon-tl--profile-buffer-p)