From 7593590d5c7a1ea9824424cc46d0cad4130eb9b2 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 14 Nov 2022 15:41:08 +0100 Subject: view instance description: handle calling from empty profiles --- lisp/mastodon-tl.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index e8b94d7..3e8c08d 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1494,12 +1494,19 @@ BRIEF means to show fewer details. INSTANCE is an instance domain name." (interactive) (mastodon-tl--do-if-toot - (let* ((toot (mastodon-tl--property 'toot-json)) + (let* ((profile-p (get-text-property (point) 'profile-json)) + (toot (if profile-p + (mastodon-tl--property 'profile-json) ; profile may have 0 toots + (mastodon-tl--property 'toot-json))) (reblog (alist-get 'reblog toot)) (account (or (alist-get 'account reblog) (alist-get 'account toot))) - (url (alist-get 'url account)) - (username (alist-get 'username account)) + (url (if profile-p + (alist-get 'url toot) ; profile + (alist-get 'url account))) + (username (if profile-p + (alist-get 'username toot) ;; profile + (alist-get 'username account))) (instance (if instance (concat "https://" instance) ;; pleroma URL is https://instance.com/users/username -- cgit v1.2.3