diff options
author | mousebot <mousebot@riseup.net> | 2021-08-09 19:49:17 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-08-09 19:49:17 +0200 |
commit | 8ffa61e0d46c5a263d5afeaa95069608148405a3 (patch) | |
tree | a73ea651b4e14a5af49142a34b7ab5e0b7d930bd | |
parent | 2efdb5eb4ddc824ad269af096cb508b8f6867077 (diff) |
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
-rw-r--r-- | lisp/mastodon-tl.el | 4 |
1 files changed, 3 insertions, 1 deletions
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 |