branch: elpa/mastodon commit c8ff61b9cb1aae43e488cfc11611f991b0713a66 Merge: be10829d43 515cea4f6f Author: marty hiatt <martianhia...@disroot.org> Commit: marty hiatt <martianhia...@disroot.org>
Merge branch 'temp-dev' into develop --- lisp/mastodon-notifications.el | 7 ++++--- lisp/mastodon-transient.el | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index 69381239ea..070e79d5f1 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -812,27 +812,28 @@ Status notifications are created when you call map) "Keymap for viewing follow requests.") +;; FIXME: these are only for grouped notifs, else the fields are JSON bools (defvar mastodon-notifications-policy-vals '("accept" "filter" "drop")) (defun mastodon-notifications--get-policy () "Return the notification filtering policy." (interactive) - (let ((url (mastodon-http--api "notifications/policy"))) + (let ((url (mastodon-notifications--api "notifications/policy"))) (mastodon-http--get-json url))) (defun mastodon-notifications--update-policy (&optional params) "Update notifications filtering policy. PARAMS is an alist of parameters." ;; https://docs.joinmastodon.org/methods/notifications/#update-the-filtering-policy-for-notifications - (let ((url (mastodon-http--api "notifications/policy"))) + (let ((url (mastodon-notifications--api "notifications/policy"))) (mastodon-http--patch url params))) (defun mastodon-notifications--get-requests (&optional params) "Get a list of notification requests data from the server. PARAMS is an alist of parameters." ;; NB: link header pagination - (let ((url (mastodon-http--api "notifications/requests"))) + (let ((url (mastodon-notifications--api "notifications/requests"))) (mastodon-http--get-json url params))) (defun mastodon-notifications--request-accept (&optional reject) diff --git a/lisp/mastodon-transient.el b/lisp/mastodon-transient.el index 1d1ecd0ba6..fd61c7ba1e 100644 --- a/lisp/mastodon-transient.el +++ b/lisp/mastodon-transient.el @@ -343,6 +343,9 @@ Do not add more than the server's maximum setting." (tp-bools-to-strs args))) (mastodon-toot--update-status-fields)))) +(defvar mastodon-notifications-policy-vals) +(declare-function mastodon-notifications--get-policy "mastodon-notifications") + (transient-define-prefix mastodon-notifications-policy () "Set notifications policy options." ;; https://docs.joinmastodon.org/methods/notifications/#get-policy @@ -386,7 +389,7 @@ Do not add more than the server's maximum setting." (resp (mastodon-notifications--update-policy parsed))) (mastodon-http--triage resp - (lambda (resp) + (lambda (_resp) (message "Settings updated!\n%s" (pp-to-string parsed)))))) ;;; CLASSES