aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-08-19 16:22:53 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-08-19 16:22:53 +0200
commit377c2ecb0a423ff676f7f2a3695bcb7a7883df57 (patch)
tree36527e3b77728fa348061842a4b0f20c766cd7e1 /lisp/mastodon-tl.el
parent64e39969c0f49d227817ac0fec4593e7eba5db53 (diff)
tl--init: funcall get-response-async or get-json async
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 62064a7..2c1ef43 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -3066,16 +3066,16 @@ a timeline from."
(concat "https://" instance "/api/v1/" endpoint)
(mastodon-http--api endpoint)))
(buffer (concat "*mastodon-" buffer-name "*")))
- (if headers
- (mastodon-http--get-response-async
- url params 'mastodon-tl--init*
- buffer endpoint update-function headers params hide-replies)
- (mastodon-http--get-json-async
- url params 'mastodon-tl--init*
- buffer endpoint update-function nil params hide-replies instance))))
-
-(defun mastodon-tl--init* (response buffer endpoint update-function
- &optional headers update-params hide-replies instance)
+ (funcall
+ (if headers
+ #'mastodon-http--get-response-async
+ #'mastodon-http--get-json-async)
+ url params 'mastodon-tl--init*
+ buffer endpoint update-function headers params hide-replies instance)))
+
+(defun mastodon-tl--init*
+ (response buffer endpoint update-function &optional headers
+ update-params hide-replies instance)
"Initialize BUFFER with timeline targeted by ENDPOINT.
UPDATE-FUNCTION is used to recieve more toots.
RESPONSE is the data returned from the server by