aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-13 11:12:33 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-13 11:12:33 +0200
commit2a5700a46e3d66c049a757856f10eb039cc462fa (patch)
treea7c745e4db40359fde95bd4bf26c86a691df1e9c /lisp/mastodon-http.el
parent9aa6a50e095b08bbaf64566a7661ddf0a1880b5d (diff)
http: build query str only when we have a value
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r--lisp/mastodon-http.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 94a24fc..8741972 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -118,8 +118,9 @@ Unless UNAUTHENTICATED-P is non-nil."
;; url-build-query-string adds 'nil' for empty params so lets stick with our
;; own:
(mapconcat (lambda (p)
- (concat (url-hexify-string (car p))
- "=" (url-hexify-string (cdr p))))
+ (when (cdr p) ; only when value
+ (concat (url-hexify-string (car p))
+ "=" (url-hexify-string (cdr p)))))
params "&"))
(defun mastodon-http--build-array-params-alist (param-str array)