aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-notifications.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@disroot.org>2024-10-29 08:45:33 +0100
committermarty hiatt <martianhiatus@disroot.org>2024-10-29 08:46:18 +0100
commiteb736070d77d549c97e10f2c3560bcba17ba7d45 (patch)
tree52ab629a0e1842e28bd6fb379552f719df300e8a /lisp/mastodon-notifications.el
parent2a3369bdca00ff2a31363799ca3b13b9f341e720 (diff)
fix timestamp logic in notifs v2 (use base item when necessary)
Diffstat (limited to 'lisp/mastodon-notifications.el')
-rw-r--r--lisp/mastodon-notifications.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 3ef8869..06bbca7 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -346,10 +346,14 @@ ACCOUNTS is the notification accounts data."
'toot-body t) ;; includes newlines etc. for folding
"\n"
;; actual byline:
- (mastodon-tl--byline toot author-byline nil nil
- base-toot group
- (if (member type '("follow" "follow_request"))
- toot))) ;; account data!
+ (mastodon-tl--byline
+ toot author-byline nil nil base-toot group
+ (when (member type '("follow" "follow_request"))
+ toot) ;; account data!
+ ;; types listed here use base item timestamp, else we use group's
+ ;; latest timestamp:
+ (when (not (member type '("favourite" "reblog" "edit" "poll")))
+ (mastodon-tl--field 'latest_page_notification_at group))))
'item-type 'toot ;; for nav, actions, etc.
'item-id (or (alist-get 'page_max_id group) ;; newest notif
(alist-get 'id toot)) ; toot id