diff options
author | marty hiatt <martianhiatus@riseup.net> | 2023-10-28 11:36:58 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2023-10-28 11:39:25 +0200 |
commit | b8d0c9b967fbc1e38e4012ad357a7f29c621acc1 (patch) | |
tree | ab3f5f4f697b6d3d5f330d2e33aa8fa118ac7778 /lisp/mastodon-profile.el | |
parent | 5f237982e53f0804f03f88d20eecab864ab575d3 (diff) |
triage: call cb on response. do-user-action-fun: check response data
this means the triage callback always needs to handle 1 arg.
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r-- | lisp/mastodon-profile.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 9850b81..1003853 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -319,7 +319,7 @@ Ask for confirmation if length > 500 characters." "Send PATCH request with the updated profile NOTE to URL." (let ((response (mastodon-http--patch url `(("note" . ,note))))) (mastodon-http--triage response - (lambda () (message "Profile note updated!"))))) + (lambda (_) (message "Profile note updated!"))))) (defun mastodon-profile--update-preference (pref val &optional source) "Update account PREF erence to setting VAL. @@ -329,7 +329,7 @@ SOURCE means that the preference is in the `source' part of the account JSON." (pref-formatted (if source (concat "source[" pref "]") pref)) (response (mastodon-http--patch url `((,pref-formatted . ,val))))) (mastodon-http--triage response - (lambda () + (lambda (_) (mastodon-profile--fetch-server-account-settings) (message "Account setting %s updated to %s!" pref val))))) @@ -441,7 +441,7 @@ Returns an alist." (params (mastodon-profile--make-meta-fields-params fields-updated)) (response (mastodon-http--patch url params))) (mastodon-http--triage response - (lambda () + (lambda (_) (mastodon-profile--fetch-server-account-settings) (message "Metadata fields updated to %s!" fields-updated))))) @@ -816,7 +816,7 @@ Optionally provide the ID of the account to remove." (when (y-or-n-p (format "Remove follower %s? " handle)) (let ((response (mastodon-http--post url))) (mastodon-http--triage response - (lambda () + (lambda (_) (message "Follower %s removed!" handle))))))) (defun mastodon-profile--remove-from-followers-at-point () @@ -862,7 +862,7 @@ NOTE-OLD is the text of any existing note." (url (mastodon-http--api (format "accounts/%s/note" id))) (response (mastodon-http--post url params))) (mastodon-http--triage response - (lambda () + (lambda (_) (message "Private note on %s added!" handle))))) (defun mastodon-profile--view-account-private-note () |