aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2022-02-05 14:39:59 +0100
committermousebot <mousebot@riseup.net>2022-02-05 14:40:39 +0100
commit847b50f315ff96988927e8198eee2517a15cca7b (patch)
tree3fb6ce8b0d595bd159bd4f5175ddb6e11af3f410 /lisp
parent2f58b4fd7de85367156caa9f39ac46e54f262fb9 (diff)
message for no follow reqs in add-author-bylines fun
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-profile.el30
1 files changed, 16 insertions, 14 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index c04c40b..5811a4a 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -385,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.