aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-profile.el
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2022-02-11 10:21:59 +0100
committermousebot <mousebot@riseup.net>2022-02-11 10:21:59 +0100
commit4e4f9f3aa2f3f08ebfa5d2ae3dbab0b13813fd8f (patch)
tree8e7115ea600fcf617d078e42d2eaf0b92dbeb587 /lisp/mastodon-profile.el
parentcc5e11851daa8979521520a1912a83e6ced26a00 (diff)
parent16685d4e3fb7fce2011d751fc26661aa41ddd3aa (diff)
Merge branch 'develop' into mpv-play-at-point
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.