From 3b3f5228ac9637cb40d15b829912887f72a0590e Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Mon, 15 Jan 2024 13:34:33 +0000 Subject: profile: Use v2 search when looking for users --- lisp/mastodon-profile.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 22dd586..fc90cf7 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -777,13 +777,13 @@ If the handle does not match a search return then retun NIL." (let* ((handle (if (string= "@" (substring handle 0 1)) (substring handle 1 (length handle)) handle)) - (args `(("q" . ,handle))) + (args `(("q" . ,handle) + ("type" . "accounts"))) + (result (mastodon-http--get-json (mastodon-http--api-search) args)) (matching-account (seq-remove (lambda (x) (not (string= (alist-get 'acct x) handle))) - (mastodon-http--get-json - (mastodon-http--api "accounts/search") - args)))) + (alist-get 'accounts result)))) (when (equal 1 (length matching-account)) (elt matching-account 0)))) -- cgit v1.2.3