diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-08-31 08:49:41 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-08-31 08:49:41 +0200 |
commit | e670268cc5dbaf1f4b0605a79ec63422bda03c3a (patch) | |
tree | 9b3c3f442ca834b4e2dcd150bd99355cc7219dda /lisp | |
parent | 7672a0240b45675c1fde0ca960fea56c02ecc4ab (diff) |
view brief prefs fun
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-profile.el | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 9c28703..0496d53 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -241,6 +241,26 @@ JSON is the data returned by the server." (mastodon-http--triage response (lambda () (message "Profile note updated!")))))) +(defun mastodon-profile-view-preferences () + "View user preferences in another window." + (interactive) + (let* ((url (mastodon-http--api "preferences")) + (response (mastodon-http--get-json url)) + (buf (get-buffer-create "*mastodon-preferences*"))) + (with-current-buffer buf + (switch-to-buffer-other-window buf) + (erase-buffer) + (special-mode) + (let ((inhibit-read-only t)) + (while response + (let ((el (pop response))) + (insert + (format "%-30s %s" + (prin1-to-string (car el)) + (prin1-to-string (cdr el))) + "\n\n")))) + (goto-char (point-min))))) + (defun mastodon-profile--relationships-get (id) "Fetch info about logged-in user's relationship to user with id ID." (let* ((their-id id) |