aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-21 20:36:20 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-21 20:36:20 +0100
commit4f022007b8b1000c78881c5633c35f3f09afd955 (patch)
tree88ed8df42481f8b4292c7c7ea50f917c473645b2
parent62e18cd138f322b0e1b8ce1139b4d129f6929b9a (diff)
add joined date to profile pages
-rw-r--r--lisp/mastodon-profile.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index f81441e..e0b8279 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -555,7 +555,9 @@ FIELDS means provide a fields vector fetched by other means."
(alist-get 'followed_by relationships)))
(followsp (or (equal follows-you 't) (equal followed-by-you 't)))
(fields (mastodon-profile--fields-get account))
- (pinned (mastodon-profile--get-statuses-pinned account)))
+ (pinned (mastodon-profile--get-statuses-pinned account))
+ (joined-ts (ts-parse
+ (mastodon-profile--account-field account 'created_at))))
(with-output-to-temp-buffer buffer
(switch-to-buffer buffer)
(mastodon-mode)
@@ -600,7 +602,15 @@ FIELDS means provide a fields vector fetched by other means."
(mastodon-profile--fields-insert fields)
'success)
"\n")
- ""))
+ "")
+ (propertize
+ (format "Joined %s"
+ (format "%s" (concat (ts-month-name joined-ts)
+ " "
+ (number-to-string
+ (ts-year joined-ts)))))
+ 'face 'success)
+ "\n\n")
'profile-json account)
;; insert counts
(mastodon-tl--set-face