diff options
author | mousebot <mousebot@riseup.net> | 2021-11-03 09:22:04 +0100 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-11-03 09:22:04 +0100 |
commit | cba3982050c879fdebe10e9f6f64bd7721a8fb51 (patch) | |
tree | 7cad028dee37ac969d48d25171b924a384b72745 /lisp | |
parent | e7c7da386c812f9452b072567e822077180f3dc5 (diff) |
fix broken completion, restore search--get-user-info{-@}
we need this modified version of -get-user-info because it adds the @ prefix
to the account handle, which our completion prefix also contains
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-search.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index 2227d79..5f52bb7 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -46,6 +46,12 @@ ;; functions for company completion of mentions in mastodon-toot +(defun mastodon-search--get-user-info-@ (account) + "Get user handle, display name and account URL from ACCOUNT." + (list (cdr (assoc 'display_name account)) + (concat "@" (cdr (assoc 'acct account))) + (cdr (assoc 'url account)))) + (defun mastodon-search--search-accounts-query (query) "Prompt for a search QUERY and return accounts synchronously. Returns a nested list containing user handle, display name, and URL." @@ -55,7 +61,7 @@ Returns a nested list containing user handle, display name, and URL." (response (if (equal mastodon-toot--enable-completion-for-mentions "following") (mastodon-http--get-search-json url query "following=true") (mastodon-http--get-search-json url query)))) - (mapcar #'mastodon-search--get-user-info + (mapcar #'mastodon-search--get-user-info-@ response))) ;; functions for mastodon search |