diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-18 21:57:42 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-19 13:21:37 +0100 |
commit | d6470dd725c0da74345e1ed8bf40822730e0c004 (patch) | |
tree | 0e8bb82e30d1abca9a167dd292c0b6bc55c645e0 /lisp/mastodon-profile.el | |
parent | e0ee8cbfa8e0e883f800ea09dbcff844f988fffb (diff) |
map-get-accts > map-alist, handle no results for fam folls
use tl--map-alist in views.el
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r-- | lisp/mastodon-profile.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 3661615..684b11f 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -70,7 +70,7 @@ (autoload 'mastodon-tl--init "mastodon-tl.el") (autoload 'mastodon-tl--init-sync "mastodon-tl") (autoload 'mastodon-tl--interactive-user-handles-get "mastodon-tl") -(autoload 'mastodon-tl--map-get-accts "mastodon-views") +(autoload 'mastodon-tl--map-alist "mastodon-tl") (autoload 'mastodon-tl--profile-buffer-p "mastodon tl") (autoload 'mastodon-tl--property "mastodon-tl.el") (autoload 'mastodon-tl--render-text "mastodon-tl.el") @@ -827,9 +827,7 @@ These include the author, author of reblogged entries and any user mentioned." 'list (list (alist-get 'acct this-account)) (mastodon-profile--extract-users-handles reblog) - (mapcar (lambda (mention) - (alist-get 'acct mention)) - mentions))))))) + (mastodon-tl--map-alist 'acct mentions))))))) (defun mastodon-profile--lookup-account-in-status (handle status) "Return account for HANDLE using hints in STATUS if possible." @@ -989,10 +987,12 @@ the given account." (url (mastodon-http--api "accounts/familiar_followers")) (json (mastodon-http--get-json url params)) (accounts (alist-get 'accounts (car json))) ; first id result - (handles (mastodon-tl--map-get-accts accounts)) - (choice (completing-read "Show profile of user: " - handles))) - (mastodon-profile--show-user choice))) + (handles (mastodon-tl--map-alist 'acct accounts))) + (if (null handles) + (message "Looks like there are no familiar followers for this account") + (let ((choice (completing-read "Show profile of user: " + handles))) + (mastodon-profile--show-user choice))))) (provide 'mastodon-profile) ;;; mastodon-profile.el ends here |