diff options
author | martianh <martianh@noreply.codeberg.org> | 2024-01-26 15:14:57 +0000 |
---|---|---|
committer | martianh <martianh@noreply.codeberg.org> | 2024-01-26 15:14:57 +0000 |
commit | 07b90525015b86920011585599a9810b47b48f4e (patch) | |
tree | d7080c4d1ff84a276016023ced9685f3c46e6461 | |
parent | 844a97ca891650891b233e3c06d72a0a2ede7048 (diff) | |
parent | 3b3f5228ac9637cb40d15b829912887f72a0590e (diff) |
Merge pull request 'profile: Use v2 search when looking for users' (#524) from dme/mastodon.el:develop into develop
Reviewed-on: https://codeberg.org/martianh/mastodon.el/pulls/524
-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)))) |