aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-search.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-08-06 14:44:46 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-08-06 14:44:46 +0200
commiteca58804642fbb2f4a90a190610da641e0ef4915 (patch)
tree97285adc59e043c9fec660f8e21a9f0f23763dcd /lisp/mastodon-search.el
parent88c39b1fdda40596c72dfeefc6c8db5103bc015e (diff)
search.el: re-write search-accounts-query
Diffstat (limited to 'lisp/mastodon-search.el')
-rw-r--r--lisp/mastodon-search.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el
index f862f3c..7ebd88e 100644
--- a/lisp/mastodon-search.el
+++ b/lisp/mastodon-search.el
@@ -64,11 +64,13 @@
Returns a nested list containing user handle, display name, and URL."
(let* ((url (mastodon-http--api "accounts/search"))
(response
- (if (equal mastodon-toot--completion-style-for-mentions "following")
- (mastodon-http--get-json
- url `(("q" . ,query) ("following" . "true"))
- :silent)
- (mastodon-http--get-json url `(("q" . ,query)) :silent))))
+ (mastodon-http--get-json
+ url
+ `(("q" . ,query) ;; NB: nil can break params (but works for me)
+ ,(when (equal "following"
+ mastodon-toot--completion-style-for-mentions)
+ '("following" . "true")))
+ :silent)))
(mapcar #'mastodon-search--get-user-info-@ response)))
;; functions for tags completion: