diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-profile.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 0c91556..1fc4d09 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -212,11 +212,15 @@ JSON is the data returned by the server." ;;; account preferences -(defun mastodon-profile--get-source-prefs () - "Return the \"source\" preferences from the server." +(defun mastodon-profile--get-json-value (val) + "Fetch current VAL ue from account." (let* ((url (mastodon-http--api "accounts/verify_credentials")) (response (mastodon-http--get-json url))) - (alist-get 'source response))) + (alist-get val response))) + +(defun mastodon-profile--get-source-prefs () + "Return the \"source\" preferences from the server." + (mastodon-profile--get-json-value 'source)) (defun mastodon-profile--get-source-pref (pref) "Return account PREF erence from the \"source\" section on the server." |