aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-10-17 20:11:16 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-10-17 20:12:45 +0200
commit4653bdadfcd9a5487e8d1b01c8186a0458578f9f (patch)
tree67acbc236595198636a981f4e89562925706708d
parent34979a5e64c8d07d028e7a8a59d4f3f156fb869c (diff)
notifs: mastodon-notifications--types
-rw-r--r--lisp/mastodon-notifications.el19
1 files changed, 6 insertions, 13 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 59b90fd..9ec3252 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -91,16 +91,10 @@ make them unweildy."
(defvar mastodon-tl--fold-toots-at-length)
(defvar mastodon-tl--show-avatars)
-(defvar mastodon-notifications--types-alist
- '(("follow" . mastodon-notifications--follow)
- ("favourite" . mastodon-notifications--favourite)
- ("reblog" . mastodon-notifications--reblog)
- ("mention" . mastodon-notifications--mention)
- ("poll" . mastodon-notifications--poll)
- ("follow_request" . mastodon-notifications--follow-request)
- ("status" . mastodon-notifications--status)
- ("update" . mastodon-notifications--edit))
- "Alist of notification types and their corresponding function.")
+(defvar mastodon-notifications--types
+ '("favourite" "reblog" "mention" "poll"
+ "follow_request" "follow" "status" "update")
+ "A list of notification types according to their name on the server.")
(defvar mastodon-notifications--response-alist
'(("Followed" . "you")
@@ -293,7 +287,7 @@ ACCOUNTS is data of the accounts that have reacted to the notification."
(mastodon-notifications--byline-concat
(alist-get type-sym mastodon-notifications--action-alist))))
;; action authors
- (cond ((member type-sym '(follow_request mention))
+ (cond ((member type-sym '(follow follow_request mention))
"") ;; mentions are normal statuses
(t (mastodon-notifications--byline-accounts
accounts status group)))
@@ -467,8 +461,7 @@ Status notifications are created when you call
(defun mastodon-notifications--filter-types-list (type)
"Return a list of notification types with TYPE removed."
- (let ((types (mapcar #'car mastodon-notifications--types-alist)))
- (remove type types)))
+ (remove type mastodon-notifications--types))
(defun mastodon-notifications--clear-all ()
"Clear all notifications."