aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2022-02-18 16:02:46 +0100
committermousebot <mousebot@riseup.net>2022-02-18 16:19:18 +0100
commit868a5680953d35f66cb64f92e940f55d579c74b2 (patch)
treeea1aa1154b821f85d45de458652aedb98b4a756b
parent8526e6c1cd25e9d060c15f1e11aa83450e5f0f01 (diff)
handle empty display_name in mastodon-tl--do-user-action-and-response
-rw-r--r--lisp/mastodon-tl.el4
1 files changed, 3 insertions, 1 deletions
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)