diff options
Diffstat (limited to 'lisp/mastodon-search.el')
-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 |