From 315c5d31195253462e8862a7877d45911bfc9956 Mon Sep 17 00:00:00 2001 From: mousebot Date: Fri, 22 Oct 2021 12:00:21 +0200 Subject: use http--api in max-toot-chars fun --- lisp/mastodon-toot.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 76c2f87..824f0c6 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -145,10 +145,9 @@ Valid values are \"direct\", \"private\" (followers-only), \"unlisted\", and \"p "Keymap for `mastodon-toot'.") (defun mastodon-toot--get-max-toot-chars () - "" + "Fetch max_toot_chars from `mastodon-instance-url'." (let ((instance-json (mastodon-http--get-json - (concat mastodon-instance-url - "/api/v1/instance")))) + (mastodon-http--api "instance")))) (setq mastodon-toot--max-toot-chars (number-to-string (cdr (assoc 'max_toot_chars instance-json)))))) -- cgit v1.2.3