diff options
author | mousebot <mousebot@riseup.net> | 2022-01-05 14:14:36 +0100 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2022-01-10 19:49:28 +0100 |
commit | 4eb0b578b5e4ba920999427c137b98043b41c9d4 (patch) | |
tree | 1f66711787357738ae58ade24ee135d9f51fac14 /lisp | |
parent | f6b7e5f3107e1b1d4abfb93f9dad1c2dfffee958 (diff) |
add support for poll notifications
finally we now display all types of notifications! it's about bloody time.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-notifications.el | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index 921fdc7..9444658 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -55,7 +55,8 @@ ("favourite" . mastodon-notifications--favourite) ("reblog" . mastodon-notifications--reblog) ("follow_request" . mastodon-notifications--follow-request) - ("status" . mastodon-notifications--status)) + ("status" . mastodon-notifications--status) + ("poll" . mastodon-notifications--poll)) "Alist of notification types and their corresponding function.") (defvar mastodon-notifications--response-alist @@ -64,7 +65,8 @@ ("Favourited" . "your status from") ("Boosted" . "your status from") ("Requested to follow" . "you") - ("Posted" . "a post")) + ("Posted" . "a post") + ("Posted a poll" . "that has now ended")) "Alist of subjects for notification types.") (defun mastodon-notifications--byline-concat (message) @@ -151,6 +153,10 @@ Status notifications are given when `mastodon-tl--enable-notify-user-posts' has been set." (mastodon-notifications--format-note note 'status)) +(defun mastodon-notifications--poll (note) + "Format for a `poll' NOTE." + (mastodon-notifications--format-note note 'poll)) + (defun mastodon-notifications--format-note (note type) "Format for a NOTE of TYPE." (let ((id (alist-get 'id note)) @@ -186,7 +192,7 @@ Status notifications are given when (cond ((equal type 'boost) "Boosted") ((equal type 'favorite) - "Favorited") + "Favourited") ((equal type 'follow-request) "Requested to follow") ((equal type 'follow) @@ -194,7 +200,9 @@ Status notifications are given when ((equal type 'mention) "Mentioned") ((equal type 'status) - "Posted")))) + "Posted") + ((equal type 'poll) + "Posted a poll")))) id))) (defun mastodon-notifications--insert-status (toot body author-byline action-byline id) |