diff options
author | mousebot <mousebot@riseup.net> | 2021-10-22 12:00:21 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-10-22 12:00:21 +0200 |
commit | 315c5d31195253462e8862a7877d45911bfc9956 (patch) | |
tree | 3ca3c9e851daf727d68143e98f9ad07d5fef68cc | |
parent | b81c3259a5224e296e8cf8a62db19767490a2fcb (diff) |
use http--api in max-toot-chars fun
-rw-r--r-- | lisp/mastodon-toot.el | 5 |
1 files 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)))))) |