aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-profile.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r--lisp/mastodon-profile.el33
1 files changed, 17 insertions, 16 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 21b40b3..5811a4a 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -5,7 +5,7 @@
;; Maintainer: Marty Hiatt <martianhiatus@riseup.net>
;; Version: 0.10.0
;; Package-Requires: ((emacs "27.1") (seq "1.0"))
-;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
+;; Homepage: https://codeberg.org/martianh/mastodon.el
;; This file is not part of GNU Emacs.
@@ -146,7 +146,6 @@ extra keybindings."
(defun mastodon-profile--view-follow-requests ()
"Open a new buffer displaying the user's follow requests."
(interactive)
- (mastodon-profile-mode)
(mastodon-tl--init "follow-requests"
"follow_requests"
'mastodon-profile--add-author-bylines))
@@ -386,20 +385,22 @@ FIELD is used to identify regions under 'account"
(defun mastodon-profile--add-author-bylines (tootv)
"Convert TOOTV into a author-bylines and insert."
(let ((inhibit-read-only t))
- (mapc (lambda (toot)
- (let ((start-pos (point)))
- (insert "\n"
- (propertize
- (mastodon-tl--byline-author `((account . ,toot)))
- 'byline 't
- 'toot-id (alist-get 'id toot)
- 'base-toot-id (mastodon-tl--toot-id toot)
- 'toot-json toot))
- (mastodon-media--inline-images start-pos (point))
- (insert "\n"
- (mastodon-tl--render-text (alist-get 'note toot) nil)
- "\n")))
- tootv)))
+ (if (equal tootv '[])
+ (message "Looks like you have no follow requests for the moment.")
+ (mapc (lambda (toot)
+ (let ((start-pos (point)))
+ (insert "\n"
+ (propertize
+ (mastodon-tl--byline-author `((account . ,toot)))
+ 'byline 't
+ 'toot-id (alist-get 'id toot)
+ 'base-toot-id (mastodon-tl--toot-id toot)
+ 'toot-json toot))
+ (mastodon-media--inline-images start-pos (point))
+ (insert "\n"
+ (mastodon-tl--render-text (alist-get 'note toot) nil)
+ "\n")))
+ tootv))))
(defun mastodon-profile--search-account-by-handle (handle)
"Return an account based on a user's HANDLE.