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:45:33 +0100
commitc69917a12ece246a18720f4b7ecc40f739cd011e (patch)
tree14fc644c8d4d9326b645a66307d55f0f8496a7c6 /lisp/mastodon-notifications.el
parent5d3b80d6a85a036aabcf690bd07cef92b502c33d (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