aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-profile.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-05 15:43:35 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-05 15:50:25 +0100
commit6556a83fa6bc67c5c44022ab9c2334ef7ffe5549 (patch)
tree9aa40c21f9fb22a83723a2ecccf5c693d2bc52ff /lisp/mastodon-profile.el
parent10c5926d75a67ab799e63f896546f54e3706d65d (diff)
Revert "fetch-server-account-settings: only fetch if var not set"
This reverts commit 42990b2a471afc2d4cc1102f8cec8e70982f2e2c.
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r--lisp/mastodon-profile.el41
1 files changed, 20 insertions, 21 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 55e7d42..4aa9310 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -300,27 +300,26 @@ This is done after changing the setting on the server."
"Fetch basic account settings from the server.
Store the values in `mastodon-profile-account-settings'.
Run in `mastodon-mode-hook'."
- (unless mastodon-profile-account-settings
- (let ((keys '(locked discoverable display_name bot))
- (source-keys '(privacy sensitive language)))
- (mapc (lambda (k)
- (mastodon-profile-update-preference-plist
- k
- (mastodon-profile--get-json-value k)))
- keys)
- (mapc (lambda (sk)
- (mastodon-profile-update-preference-plist
- sk
- (mastodon-profile--get-source-value sk)))
- source-keys)
- ;; hack for max toot chars:
- (mastodon-toot--get-max-toot-chars :no-toot)
- (mastodon-profile-update-preference-plist 'max_toot_chars
- mastodon-toot--max-toot-chars)
- ;; TODO: remove now redundant vars, replace with fetchers from the plist
- (setq mastodon-toot--visibility (mastodon-profile--get-pref 'privacy)
- mastodon-toot--content-nsfw (mastodon-profile--get-pref 'sensitive))
- mastodon-profile-account-settings)))
+ (let ((keys '(locked discoverable display_name bot))
+ (source-keys '(privacy sensitive language)))
+ (mapc (lambda (k)
+ (mastodon-profile-update-preference-plist
+ k
+ (mastodon-profile--get-json-value k)))
+ keys)
+ (mapc (lambda (sk)
+ (mastodon-profile-update-preference-plist
+ sk
+ (mastodon-profile--get-source-value sk)))
+ source-keys)
+ ;; hack for max toot chars:
+ (mastodon-toot--get-max-toot-chars :no-toot)
+ (mastodon-profile-update-preference-plist 'max_toot_chars
+ mastodon-toot--max-toot-chars)
+ ;; TODO: remove now redundant vars, replace with fetchers from the plist
+ (setq mastodon-toot--visibility (mastodon-profile--get-pref 'privacy)
+ mastodon-toot--content-nsfw (mastodon-profile--get-pref 'sensitive))
+ mastodon-profile-account-settings))
(defun mastodon-profile-account-locked-toggle ()
"Toggle the locked status of your account.