aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-notifications.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-16 13:02:41 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-16 13:02:41 +0100
commit37e9bb115ae5ea9de7d8d2bddb60659c778314fe (patch)
treebc372e43ba9a9a32749c3fa6efc959a206554e9b /lisp/mastodon-notifications.el
parent97285a25f0d8613deb420e51acd83bc27b04ec46 (diff)
parent44e3f3796c529ea3b52be54be4636ca8d6f54c3f (diff)
Merge branch 'develop' into lists
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."