aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-10-10 10:29:59 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-10-10 10:29:59 +0200
commit4b37b7c908ab1ebfa03ccdeafea42494c9c82614 (patch)
treeac733cf311959bbef479151512c5aa57464fd796 /lisp
parent6d20b69857f207963a6f9be8528c1c7e84d52c7e (diff)
unread notifs: return number directly
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-notifications.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index ce3aea8..0c56cbb 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -384,8 +384,9 @@ Status notifications are created when you call
"Return the number of unread notifications for the current account."
;; params: limit - max 1000, default 100, types[], exclude_types[], account_id
(let* ((endpoint "notifications/unread_count")
- (url (mastodon-http--api endpoint)))
- (mastodon-http--get-json url)))
+ (url (mastodon-http--api endpoint))
+ (resp (mastodon-http--get-json url)))
+ (alist-get 'count resp)))
(provide 'mastodon-notifications)
;;; mastodon-notifications.el ends here