aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-notifications.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-24 15:40:51 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-24 15:40:51 +0100
commitad2379ad7d0de022b92e07cabeaa4f08b7cdbf55 (patch)
tree072c4ffd7c792e445cfee1efd171f5c316b5a7b0 /lisp/mastodon-notifications.el
parent1713abbe28c4a8ad684b651450b2c6e06a512c9a (diff)
parentb2b8fe39b6863a1398bf7d50e9ee9bc3143d2fe2 (diff)
Merge branch 'develop' into capf-completion
Diffstat (limited to 'lisp/mastodon-notifications.el')
-rw-r--r--lisp/mastodon-notifications.el32
1 files changed, 7 insertions, 25 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index f9e2fe5..f5ddea3 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -51,6 +51,7 @@
(autoload 'mastodon-profile--view-follow-requests "mastodon-profile.el")
(autoload 'mastodon-tl--reload-timeline-or-profile "mastodon-tl")
(autoload 'mastodon-tl--update "mastodon-tl")
+(autoload 'mastodon-notifications-get "mastodon")
(defvar mastodon-tl--buffer-spec)
(defvar mastodon-tl--display-media-p)
(defvar mastodon-mode-map)
@@ -124,7 +125,7 @@ follow-requests view."
(lambda ()
(if f-reqs-view-p
(mastodon-profile--view-follow-requests)
- (mastodon-notifications--get))
+ (mastodon-notifications-get))
(message "Follow request of %s (@%s) %s!"
name handle (if reject
"rejected"
@@ -276,51 +277,32 @@ of the toot responded to."
(mapc #'mastodon-notifications--by-type json)
(goto-char (point-min))))
-;;;###autoload
-(defun mastodon-notifications--get (&optional type buffer-name)
- "Display NOTIFICATIONS in buffer.
-Optionally only print notifications of type TYPE, a string.
-BUFFER-NAME is added to \"*mastodon-\" to create the buffer name."
- (interactive)
- (let ((buffer (or (concat "*mastodon-" buffer-name "*")
- "*mastodon-notifications*")))
- (if (get-buffer buffer)
- (progn (switch-to-buffer buffer)
- (mastodon-tl--update))
- (message "Loading your notifications...")
- (mastodon-tl--init-sync
- (or buffer-name "notifications")
- "notifications"
- 'mastodon-notifications--timeline
- type)
- (use-local-map mastodon-notifications--map))))
-
(defun mastodon-notifications--get-mentions ()
"Display mention notifications in buffer."
(interactive)
- (mastodon-notifications--get "mention" "mentions"))
+ (mastodon-notifications-get "mention" "mentions"))
(defun mastodon-notifications--get-favourites ()
"Display favourite notifications in buffer."
(interactive)
- (mastodon-notifications--get "favourite" "favourites"))
+ (mastodon-notifications-get "favourite" "favourites"))
(defun mastodon-notifications--get-boosts ()
"Display boost notifications in buffer."
(interactive)
- (mastodon-notifications--get "reblog" "boosts"))
+ (mastodon-notifications-get "reblog" "boosts"))
(defun mastodon-notifications--get-polls ()
"Display poll notifications in buffer."
(interactive)
- (mastodon-notifications--get "poll" "polls"))
+ (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"))
+ (mastodon-notifications-get "status" "statuses"))
(defun mastodon-notifications--filter-types-list (type)
"Return a list of notification types with TYPE removed."