diff options
author | marty hiatt <martianhiatus@disroot.org> | 2024-10-31 09:42:26 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus@disroot.org> | 2024-10-31 09:42:26 +0100 |
commit | 8a8b13dc0a232f8018628953ce0f748bd303aaf1 (patch) | |
tree | 8c028c498b3dd3a44031cc796598d373a64c898e | |
parent | 464d2e463423f7c431f85497658531312c2ad448 (diff) |
--byline: pull fave/boost/edit/visibility from base toot if present
for non-grouped notifs, new implementation of note/base relationship
-rw-r--r-- | lisp/mastodon-tl.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index bae4f09..bb00af5 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -819,15 +819,17 @@ TS is a timestamp from the server, if any." ;; (mastodon-tl--field auto fetches from reblogs if needed): (mastodon-tl--field 'created_at toot))) (parsed-time (when created-time (date-to-time created-time))) - (faved (eq t (mastodon-tl--field 'favourited toot))) - (boosted (eq t (mastodon-tl--field 'reblogged toot))) - (bookmarked (eq t (mastodon-tl--field 'bookmarked toot))) - (visibility (mastodon-tl--field 'visibility toot)) - (base-toot-maybe (or base-toot ;; show edits for notifs - (mastodon-tl--toot-or-base toot))) ;; for boosts - (account (alist-get 'account base-toot-maybe)) + ;; non-grouped notifs now need to pull the following data from + ;; base toot: + (base-maybe (or base-toot ;; show edits for notifs + (mastodon-tl--toot-or-base toot))) ;; for boosts + (faved (eq t (mastodon-tl--field 'favourited base-maybe))) + (boosted (eq t (mastodon-tl--field 'reblogged base-maybe))) + (bookmarked (eq t (mastodon-tl--field 'bookmarked base-maybe))) + (visibility (mastodon-tl--field 'visibility base-maybe)) + (account (alist-get 'account base-maybe)) (avatar-url (alist-get 'avatar account)) - (edited-time (alist-get 'edited_at base-toot-maybe)) + (edited-time (alist-get 'edited_at base-maybe)) (edited-parsed (when edited-time (date-to-time edited-time)))) (concat ;; Boosted/favourited markers are not technically part of the byline, so @@ -923,7 +925,7 @@ TS is a timestamp from the server, if any." 'edited edited-time 'edit-history (when edited-time (mastodon-toot--get-toot-edits - (alist-get 'id base-toot-maybe))) + (alist-get 'id base-maybe))) 'byline t)))) |