From 248eead48f10f96dafa21463064a297809df6ca9 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sun, 18 Aug 2024 11:57:28 +0200 Subject: create filter cleanup --- lisp/mastodon-views.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lisp/mastodon-views.el') diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index c3c372d..5480e09 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -674,11 +674,11 @@ Prompt for a context, must be a list containting at least one of \"home\", \"notifications\", \"public\", \"thread\". Optionally, provide ID, TITLE, CONTEXT, TYPE, and TERMS to update a filter." (interactive) - (let* ((url (if id - (mastodon-http--api-v2 (format "filters/%s" id)) - (mastodon-http--api-v2 "filters"))) + (let* ((url (mastodon-http--api-v2 + (if id (format "filters/%s" id) "filters"))) (title (or title (read-string "Filter name: "))) - (terms (or terms (read-string "Terms to filter (comma or space separated): "))) + (terms (or terms + (read-string "Terms to filter (comma or space separated): "))) (terms-split (split-string terms "[, ]")) (terms-processed (if (not terms) @@ -708,7 +708,7 @@ Optionally, provide ID, TITLE, CONTEXT, TYPE, and TERMS to update a filter." (mastodon-http--post url params)))) (mastodon-views--filters-triage resp - (message "Filter %s created!" title)))) + (message "Filter %s %s!" title (if id "updated" "created"))))) (defun mastodon-views--update-filter () "Update filter at point." -- cgit v1.2.3