[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon 6112232a7a 14/18: check instance version for grou
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon 6112232a7a 14/18: check instance version for grouped-notifs |
Date: |
Thu, 21 Nov 2024 13:00:19 -0500 (EST) |
branch: elpa/mastodon
commit 6112232a7ab09d79223dbd4f84dfc53cbeaa54e1
Author: marty hiatt <martianhiatus@disroot.org>
Commit: marty hiatt <martianhiatus@disroot.org>
check instance version for grouped-notifs
---
lisp/mastodon.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index c13c3ba349..d578ab1a80 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -370,6 +370,10 @@ FORCE means to fetch from the server in any case and update
(setq mastodon-instance-data
(mastodon-http--get-json (mastodon-http--api "instance")))))
+(defun mastodon-instance-version ()
+ "Return the version string of user's instance."
+ (alist-get 'version (mastodon-instance-data)))
+
;;;###autoload
(defun mastodon-toot (&optional user reply-to-id reply-json)
"Update instance with new toot. Content is captured in a new buffer.
@@ -397,7 +401,10 @@ MAX-ID is a request parameter for pagination."
(when max-id
`(("max_id" . ,(mastodon-tl--buffer-property 'max-id))))
nil nil nil
- (if (not mastodon-group-notifications)
+ (if (or (not mastodon-group-notifications)
+ ;; if version less than 1st grouped notifs release:
+ (< 4.3 (string-to-number
+ (mastodon-instance-version))))
"v1"
"v2"))
(with-current-buffer (get-buffer-create buffer)
- [nongnu] elpa/mastodon cf64163130 18/18: Merge branch 'develop', (continued)
- [nongnu] elpa/mastodon cf64163130 18/18: Merge branch 'develop', ELPA Syncer, 2024/11/21
- [nongnu] elpa/mastodon de40a8d6cc 17/18: disable grouped notifs by default, so we don't break incompat instances, ELPA Syncer, 2024/11/21
- [nongnu] elpa/mastodon 4d5b51ee72 15/18: check instance version for grouped-notifs, ELPA Syncer, 2024/11/21
- [nongnu] elpa/mastodon f152b11732 08/18: separate thread-do function, ELPA Syncer, 2024/11/21
- [nongnu] elpa/mastodon 2af648cb28 04/18: try to respect thread CW fold status on update/more. #619., ELPA Syncer, 2024/11/21
- [nongnu] elpa/mastodon 5b13b69209 10/18: three-way state for thread folded status. #620 (wip), ELPA Syncer, 2024/11/21
- [nongnu] elpa/mastodon 4c29f39c3a 05/18: readme typo, ELPA Syncer, 2024/11/21
- [nongnu] elpa/mastodon 5c8c559105 12/18: custom grouped notifs names count. + flychecks. FIX #603, ELPA Syncer, 2024/11/21
- [nongnu] elpa/mastodon 36cfa5a68e 11/18: FIX #620. fetch thread-folded from buffer-spec in --thread, no arg., ELPA Syncer, 2024/11/21
- [nongnu] elpa/mastodon 9f3e5d71af 09/18: thread fall back to setting if no unfolded-state. #620 (not fixed), ELPA Syncer, 2024/11/21
- [nongnu] elpa/mastodon 6112232a7a 14/18: check instance version for grouped-notifs,
ELPA Syncer <=
- [nongnu] elpa/mastodon 5c54f95aa8 06/18: foll req: use display name if poss for action str, ELPA Syncer, 2024/11/21