From 868a5680953d35f66cb64f92e940f55d579c74b2 Mon Sep 17 00:00:00 2001 From: mousebot Date: Fri, 18 Feb 2022 16:02:46 +0100 Subject: handle empty display_name in mastodon-tl--do-user-action-and-response --- lisp/mastodon-tl.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index f23fe67..2fa3526 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1371,7 +1371,9 @@ NOTIFY is only non-nil when called by `mastodon-tl--follow-user'." (mastodon-profile--lookup-account-in-status user-handle (mastodon-profile--toot-json)))) (user-id (mastodon-profile--account-field account 'id)) - (name (mastodon-profile--account-field account 'display_name)) + (name (if (not (equal "" (mastodon-profile--account-field account 'display_name))) + (mastodon-profile--account-field account 'display_name) + (mastodon-profile--account-field account 'username))) (url (mastodon-http--api (if notify (format "accounts/%s/%s?notify=%s" user-id action notify) -- cgit v1.2.3