aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-profile.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-09-01 09:27:50 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-09-01 09:27:50 +0200
commit5142c83a75dd5728d11beba1711ae1f1d53cb423 (patch)
treeaca0f955a6411bcd4e37f8e112082562e409d7c3 /lisp/mastodon-profile.el
parent7e98dae4756b62b34a2526ef6c776258db4c5202 (diff)
edit display_name fun
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r--lisp/mastodon-profile.el17
1 files changed, 15 insertions, 2 deletions
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)