aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-profile.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-03-14 22:34:25 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-03-14 22:34:25 +0100
commita17f64af36f267421ae453da1f539f9e55fa0ba8 (patch)
tree88a81de57910b938b13edd37548d1ad9b000e46d /lisp/mastodon-profile.el
parent0afa65610f8f4cda5a7bfc212705a720190ce1a2 (diff)
note on profiles if user has requested to follow you
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r--lisp/mastodon-profile.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 090f685..bb2c699 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -651,11 +651,14 @@ HEADERS means also fetch link headers for pagination."
(mastodon-profile--account-field
account 'statuses_count)))
(relationships (mastodon-profile--relationships-get id))
+ (requested-you (when (not (seq-empty-p relationships))
+ (alist-get 'requested_by relationships)))
(followed-by-you (when (not (seq-empty-p relationships))
(alist-get 'following relationships)))
(follows-you (when (not (seq-empty-p relationships))
(alist-get 'followed_by relationships)))
- (followsp (or (equal follows-you 't) (equal followed-by-you 't)))
+ (followsp (or (equal follows-you 't) (equal followed-by-you 't)
+ (equal requested-you 't)))
(fields (mastodon-profile--fields-get account))
(pinned (mastodon-profile--get-statuses-pinned account))
(joined (mastodon-profile--account-field account 'created_at)))
@@ -722,10 +725,12 @@ HEADERS means also fetch link headers for pagination."
;; insert relationship (follows)
(if followsp
(mastodon-tl--set-face
- (concat (if (equal follows-you 't)
- " | FOLLOWS YOU")
- (if (equal followed-by-you 't)
- " | FOLLOWED BY YOU")
+ (concat (when (equal follows-you 't)
+ " | FOLLOWS YOU")
+ (when (equal followed-by-you 't)
+ " | FOLLOWED BY YOU")
+ (when (equal requested-you 't)
+ " | REQUESTED TO FOLLOW YOU")
"\n\n")
'success)
"") ; if no followsp we still need str-or-char-p for insert