From 4b37b7c908ab1ebfa03ccdeafea42494c9c82614 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 10 Oct 2024 10:29:59 +0200 Subject: unread notifs: return number directly --- lisp/mastodon-notifications.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp') 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 -- cgit v1.2.3