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.el19
1 files changed, 16 insertions, 3 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index d632e5e..f779648 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -161,7 +161,21 @@ extra keybindings."
(interactive)
(mastodon-tl--init "follow-requests"
"follow_requests"
- 'mastodon-profile--add-author-bylines))
+ 'mastodon-profile--insert-follow-requests))
+
+(defun mastodon-profile--insert-follow-requests (json)
+ "Insert the user's current follow requests.
+JSON is the data returned by the server."
+ (insert (mastodon-tl--set-face
+ (concat "\n ------------\n"
+ " FOLLOW REQUESTS\n"
+ " ------------\n\n")
+ 'success))
+ (if (equal json '[])
+ (insert (propertize
+ "Looks like you have no follow requests for now."
+ 'face font-lock-comment-face))
+ (mastodon-profile--add-author-bylines json)))
(defun mastodon-profile--update-user-profile-note ()
"Fetch user's profile note and display for editing."
@@ -398,8 +412,7 @@ 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))
- (if (equal tootv '[])
- (message "Looks like you have no follow requests for the moment.")
+ (when (not (equal tootv '[]))
(mapc (lambda (toot)
(let ((start-pos (point)))
(insert "\n"