From 8ffa61e0d46c5a263d5afeaa95069608148405a3 Mon Sep 17 00:00:00 2001 From: mousebot Date: Mon, 9 Aug 2021 19:49:17 +0200 Subject: use either display_name or username in author byline this fixes the situation where accounts with nothing in "display_name" would appear as only as a handle --- lisp/mastodon-tl.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 6fdf950..8f368a3 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -257,7 +257,9 @@ Optionally start from POS." "Propertize author of TOOT." (let* ((account (cdr (assoc 'account toot))) (handle (cdr (assoc 'acct account))) - (name (cdr (assoc 'display_name account))) + (name (if (not (string= "" (cdr (assoc 'display_name account)))) + (cdr (assoc 'display_name account)) + (cdr (assoc 'username account)))) (profile-url (cdr (assoc 'url account))) (avatar-url (cdr (assoc 'avatar account)))) ;; TODO: Once we have a view for a user (e.g. their posts -- cgit v1.2.3