aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-profile.el9
-rw-r--r--lisp/mastodon-toot.el4
2 files changed, 13 insertions, 0 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 6fe3e14..0c91556 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -70,6 +70,7 @@
(defvar mastodon-tl--buffer-spec)
(defvar mastodon-tl--update-point)
(defvar mastodon-mode-map)
+(defvar mastodon-toot-visibility-list)
(defvar-local mastodon-profile--account nil
"The data for the account being described in the current profile buffer.")
@@ -263,6 +264,14 @@ SOURCE means that the preference is in the 'source' part of the account json."
(lambda ()
(message "Account setting %s updated!" pref)))))
+(defun mastodon-profile-set-default-toot-visibility ()
+ "Set the default visibility for toots."
+ (interactive)
+ (let ((vis (completing-read "Set default visibility to:"
+ mastodon-toot-visibility-list
+ nil t)))
+ (mastodon-profile--update-preference "privacy" vis :source)))
+
(defun mastodon-profile-view-preferences ()
"View user preferences in another window."
(interactive)
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 253fb5d..8d8b9f3 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -126,6 +126,10 @@ This is only used if company mode is installed."
(defvar-local mastodon-toot--content-nsfw nil
"A flag indicating whether the toot should be marked as NSFW.")
+(defvar mastodon-toot-visibility-list
+ '(direct private unlisted public)
+ "A list of the available toot visibility settings.")
+
(defvar-local mastodon-toot--visibility "public"
"A string indicating the visibility of the toot being composed.