From d5e91d63d130d69c6fc45fb90962a31733004f94 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 19 Nov 2022 12:40:23 +0100 Subject: notifs: don't remove "status" from types, add other notifs views --- lisp/mastodon-notifications.el | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index a33a96b..24a8492 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -286,10 +286,35 @@ Optionally only print notifications of type TYPE, a string." (interactive) (mastodon-notifications--get "mention" "mentions")) +(defun mastodon-notifications--get-favourites () + "Display favourite notifications in buffer." + (interactive) + (mastodon-notifications--get "favourite" "favourites")) + +(defun mastodon-notifications--get-boosts () + "Display boost notifications in buffer." + (interactive) + (mastodon-notifications--get "reblog" "boosts")) + +(defun mastodon-notifications--get-polls () + "Display poll notifications in buffer." + (interactive) + (mastodon-notifications--get "poll" "polls")) + +(defun mastodon-notifications--get-statuses () + "Display status notifications in buffer. +Status notifications are created when you call +`mastodon-tl--enable-notify-user-posts'." + (interactive) + (mastodon-notifications--get "status" "statuses")) + (defun mastodon-notifications--filter-types-list (type) - "Return a list of notification types with TYPE (and \"status\") removed." - (let ((types (remove "status" - (mapcar #'car mastodon-notifications--types-alist)))) + "Return a list of notification types with TYPE removed." + (let ((types + ;; the docs don't mention "status" as an options + ;; but we do need to exclude it, so keep it in the list here + ;;(remove "status" + (mapcar #'car mastodon-notifications--types-alist))) (remove type types))) (defun mastodon-notifications--clear-all () -- cgit v1.2.3