aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-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: