aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-notifications.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-notifications.el')
-rw-r--r--lisp/mastodon-notifications.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 7c5d40b..f05e670 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -73,6 +73,15 @@
("Posted a poll" . "that has now ended"))
"Alist of subjects for notification types.")
+(defvar mastodon-notifications--map
+ (let ((map
+ (copy-keymap mastodon-mode-map)))
+ (define-key map (kbd "a") #'mastodon-notifications--follow-request-accept)
+ (define-key map (kbd "j") #'mastodon-notifications--follow-request-reject)
+ (define-key map (kbd "g") #'mastodon-notifications--get)
+ (keymap-canonicalize map))
+ "Keymap for viewing notifications.")
+
(defun mastodon-notifications--byline-concat (message)
"Add byline for TOOT with MESSAGE."
(concat
@@ -265,7 +274,8 @@ of the toot responded to."
(mastodon-tl--init-sync
"notifications"
"notifications"
- 'mastodon-notifications--timeline))
+ 'mastodon-notifications--timeline)
+ (use-local-map mastodon-notifications--map))
(defun mastodon-notifications--clear-all ()
"Clear all notifications."