From 5142c83a75dd5728d11beba1711ae1f1d53cb423 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 1 Sep 2022 09:27:50 +0200 Subject: edit display_name fun --- lisp/mastodon-profile.el | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index c43906f..116af5d 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -270,13 +270,13 @@ SOURCE means that the preference is in the 'source' part of the account json." (message "Account setting %s updated to %s!" pref val))))) (defun mastodon-profile-account-locked-toggle () - "Toggle the locked status of the user's account. + "Toggle the locked status of your account. Locked accounts mean follow requests have to be manually approved." (interactive) (mastodon-profile--toggle-account-key 'locked)) (defun mastodon-profile-account-discoverable-toggle () - "Toggle the discoverable status of the user's account. + "Toggle the discoverable status of your account. Discoverable means the account is listed in the server directory." (interactive) (mastodon-profile--toggle-account-key 'discoverable)) @@ -291,6 +291,19 @@ Discoverable means the account is listed in the server directory." (when (y-or-n-p prompt) (mastodon-profile--update-preference (symbol-name key) "true"))))) +(defun mastodon-profile--edit-account-string (key) + "Edit the string for account setting KEY." + (let* ((val (mastodon-profile--get-json-value key)) + (new-val + (read-string (format "Edit account setting %s: " key) + val))) + (mastodon-profile--update-preference (symbol-name key) new-val))) + +(defun mastodon-profile-update-display-name () + "Update display name for your account." + (interactive) + (mastodon-profile--edit-account-string 'display_name)) + (defun mastodon-profile-set-default-toot-visibility () "Set the default visibility for toots." (interactive) -- cgit v1.2.3