From eb736070d77d549c97e10f2c3560bcba17ba7d45 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 29 Oct 2024 08:45:33 +0100 Subject: fix timestamp logic in notifs v2 (use base item when necessary) --- lisp/mastodon-notifications.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lisp/mastodon-notifications.el') 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 -- cgit v1.2.3