diff options
author | mousebot <mousebot@riseup.net> | 2021-06-21 11:33:40 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-06-21 11:34:43 +0200 |
commit | 7afc5a08e35c86acc9f009404045a787ef61b77b (patch) | |
tree | fec887a623bc47dfddba7ba1edfbbdcc4c01389c | |
parent | 5e022b655b654fe1967c848b45b1400fff502d37 (diff) |
typo in async http-layer, unless in http process-json, typo in readm
-rw-r--r-- | README.org | 2 | ||||
-rw-r--r-- | lisp/mastodon-async.el | 2 | ||||
-rw-r--r-- | lisp/mastodon-http.el | 5 |
3 files changed, 4 insertions, 5 deletions
@@ -37,7 +37,7 @@ I did this for my own use and to learn more Elisp. If the code is terrible, feel ** live-updating timelines -(code adapted from https://github.com/alexjgriffith/mastodon-future.el). +(code adapted from https://github.com/alexjgriffith/mastodon-future.el.) Works for federated, local, and home timelines and for notifications. It's pretty necro, so use at your own risk. Not a super high priority for me, but some people dig it. The command prefix is =mastodon-async--stream=, and you can load various timelines from within a mastodon session like so: - =C-c h= (home) diff --git a/lisp/mastodon-async.el b/lisp/mastodon-async.el index 1690615..4367cc9 100644 --- a/lisp/mastodon-async.el +++ b/lisp/mastodon-async.el @@ -342,7 +342,7 @@ Full messages are seperated by two newlines" It then processes its output." (with-current-buffer (process-buffer proc) - (let ((start (max 1 ( - (point-max) 2)))) + (let ((start (max 1 (- (point-max) 2)))) (url-http-generic-filter proc data) (when (> url-http-end-of-headers start) (setq start url-http-end-of-headers)) diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el index 144b446..e8fd4d3 100644 --- a/lisp/mastodon-http.el +++ b/lisp/mastodon-http.el @@ -126,9 +126,8 @@ Pass response buffer to CALLBACK function." (buffer-substring-no-properties (point) (point-max)) 'utf-8))) (kill-buffer) - (if (not (or (string= "" json-string) (equal nil json-string))) - (json-read-from-string json-string) - (message "Looks like we got no JSON from the server.")))) + (unless (or (string= "" json-string) (equal nil json-string))) + (json-read-from-string json-string))) (defun mastodon-http--delete (url) "Make DELETE request to URL." |