From f342a7f7308c75213a0f54af949995cc99a04963 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 15 May 2023 23:13:01 +0200 Subject: fix views--list-action-triage message call --- lisp/mastodon-views.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lisp/mastodon-views.el') diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index dc7eb14..fbeb1c7 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -338,8 +338,8 @@ Prompt for name and replies policy." `(("title" . ,title) ("replies_policy" . ,replies-policy)) nil))) - (mastodon-views--list-action-triage response - (message "list %s created!" title)))) + (mastodon-views--list-action-triage + response "list %s created!" title))) (defun mastodon-views--delete-list-at-point () "Delete list at point." @@ -359,8 +359,8 @@ If ID is provided, delete that list." (url (mastodon-http--api (format "lists/%s" id)))) (when (y-or-n-p (format "Delete list %s?" name)) (let ((response (mastodon-http--delete url))) - (mastodon-views--list-action-triage response - (message "list %s deleted!" name)))))) + (mastodon-views--list-action-triage + response "list %s deleted!" name))))) (defun mastodon-views--get-users-followings () "Return the list of followers of the logged in account." @@ -395,7 +395,7 @@ If ACCOUNT-ID and HANDLE are provided use them rather than prompting." (url (mastodon-http--api (format "lists/%s/accounts" list-id))) (response (mastodon-http--post url `(("account_ids[]" . ,account-id))))) (mastodon-views--list-action-triage - response (message "%s added to list %s!" account list-name)))) + response "%s added to list %s!" account list-name))) (defun mastodon-views--add-toot-account-at-point-to-list () "Prompt for a list, and add the account of the toot at point to it." @@ -430,15 +430,15 @@ If ID is provided, use that list." (args (mastodon-http--build-array-params-alist "account_ids[]" `(,account-id))) (response (mastodon-http--delete url args))) (mastodon-views--list-action-triage - response (message "%s removed from list %s!" account list-name)))) + response "%s removed from list %s!" account list-name))) -(defun mastodon-views--list-action-triage (response message) - "Call `mastodon-http--triage' on RESPONSE and display MESSAGE." +(defun mastodon-views--list-action-triage (response &rest args) + "Call `mastodon-http--triage' on RESPONSE and call message on ARGS." (mastodon-http--triage response (lambda () (when (mastodon-tl--buffer-type-eq 'lists) (mastodon-views--view-lists)) - message))) + (apply #'message args)))) (defun mastodon-views--accounts-in-list (list-id) "Return the JSON of the accounts in list with LIST-ID." -- cgit v1.2.3