aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-12-29 15:10:27 +1100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-12-29 15:10:27 +1100
commit352cba8d86580ac4f525f64f3643fbb70d6583f1 (patch)
treee8628c17abf83afb6ae1f5986382ba0dc5bce4de /lisp/mastodon-tl.el
parent0db0bcf3a35468743ea21494abdb96d972bafe6b (diff)
fix update local tl, tl--update, like tl--more
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 44d31bf..bf334bd 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1429,9 +1429,10 @@ PARAMS is used to send 'local=true' for local timeline."
;; TODO
;; Look into the JSON returned here by Local
-(defun mastodon-tl--updated-json (endpoint id)
+(defun mastodon-tl--updated-json (endpoint id &optional params)
"Return JSON for timeline ENDPOINT since ID."
(let* ((args `(("since_id" . ,(mastodon-tl--as-string id))))
+ (args (if params (push params args) args))
(url (mastodon-http--api endpoint)))
(mastodon-http--get-json url args)))
@@ -2800,7 +2801,9 @@ from the start if it is nil."
(let* ((endpoint (mastodon-tl--get-endpoint))
(update-function (mastodon-tl--get-update-function))
(id (mastodon-tl--newest-id))
- (json (mastodon-tl--updated-json endpoint id)))
+ (params (when (string= (mastodon-tl--buffer-name) "*mastodon-local*")
+ '("local" . "true")))
+ (json (mastodon-tl--updated-json endpoint id params)))
(if json
(let ((inhibit-read-only t))
(mastodon-tl--set-after-update-marker)