From 678b572132df07265f4d745e579d23162a67cca0 Mon Sep 17 00:00:00 2001 From: mousebot Date: Fri, 18 Feb 2022 15:20:05 +0100 Subject: handle empty display_name in search--get-user-info ensures we hever have an empty author name slot --- lisp/mastodon-search.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index e1ca81a..10500ad 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -156,7 +156,9 @@ This is also called by `mastodon-tl--get-follow-suggestions'." (defun mastodon-search--get-user-info (account) "Get user handle, display name, account URL and profile note from ACCOUNT." - (list (alist-get 'display_name account) + (list (if (not (equal "" (alist-get 'display_name account))) + (alist-get 'display_name account) + (alist-get 'username account)) (alist-get 'acct account) (alist-get 'url account) (alist-get 'note account))) -- cgit v1.2.3