diff options
author | David Edmondson <dme@dme.org> | 2024-01-15 13:34:33 +0000 |
---|---|---|
committer | David Edmondson <dme@dme.org> | 2024-01-16 15:29:58 +0000 |
commit | 3b3f5228ac9637cb40d15b829912887f72a0590e (patch) | |
tree | ade22d92a28edf67b790aff92b51e02178b9107c /lisp | |
parent | 6fc44fe225ad229500509af6a985f58c6805481d (diff) |
profile: Use v2 search when looking for users
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-profile.el | 8 |
1 files 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)))) |