branch: elpa/mastodon
commit a80704cc6dd54f62195599cdf8663c045ed5b749
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>

    add a notifs check command
---
 lisp/mastodon.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 99a532628b..e1d7daa1de 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -104,6 +104,8 @@
   nil :interactive)
 
 (autoload 'special-mode "simple")
+(autoload 'mastodon-tl--thread-do "mastodon-tl")
+(autoload 'mastodon-notifications--get-unread-count "mastodon-notifications")
 
 (defvar mastodon-tl--highlight-current-toot)
 (defvar mastodon-notifications--map)
@@ -461,6 +463,13 @@ MAX-ID is a request parameter for pagination."
       (use-local-map mastodon-notifications--map))
     (message "Loading your notifications... Done")))
 
+;;;###autoload
+(defun mastodon-notifications-check ()
+  "Check for the number of unread notifications."
+  (interactive)
+  (let ((count (mastodon-notifications--get-unread-count)))
+    (message "Unread notifications: %s" count)))
+
 ;; URL lookup: should be available even if `mastodon.el' not loaded:
 
 ;;;###autoload

Reply via email to