From 7ada5cb566568326627d9ec985b28142b1ddf220 Mon Sep 17 00:00:00 2001 From: mousebot Date: Wed, 16 Feb 2022 11:52:58 +0100 Subject: make interactive-user-handles-get work for all profile views - profile statuses: leave as is - profile followers/following: we extract handle direct from toot-json without running mastodon-profile--extract-users-handles on the toot, as with user views there is no toot --- lisp/mastodon-tl.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index fef8a98..c4b683d 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1319,8 +1319,10 @@ Can be called to toggle NOTIFY on users already being followed." (string-prefix-p "*mastodon-search" (buffer-name))) (list (alist-get 'acct (mastodon-tl--property 'user-json)))) ;; profile view follows/followers compat: - ((string-prefix-p "accounts" (mastodon-tl--get-endpoint)) - (list (alist-get 'acct (mastodon-tl--property 'toot-json)))) + ;; but not for profile statuses: + ((when (and (string-prefix-p "accounts" (mastodon-tl--get-endpoint)) + (not (string-suffix-p "statuses" (mastodon-tl--get-endpoint)))) + (list (alist-get 'acct (mastodon-tl--property 'toot-json))))) (t (mastodon-profile--extract-users-handles (mastodon-profile--toot-json)))))) -- cgit v1.2.3