aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-client.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-10 09:55:09 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-10 09:55:09 +0200
commitcec605b86a64582f3eb237aec36678cdf311a801 (patch)
treef2b29e1cf55f2b6021cb48c67aea6e43eeda8a7d /lisp/mastodon-client.el
parent3d3c5b5eaf1c367ca151ad0493566be498e22f3e (diff)
audit client.el
Diffstat (limited to 'lisp/mastodon-client.el')
-rw-r--r--lisp/mastodon-client.el18
1 files changed, 7 insertions, 11 deletions
diff --git a/lisp/mastodon-client.el b/lisp/mastodon-client.el
index b358ed7..9b4fee9 100644
--- a/lisp/mastodon-client.el
+++ b/lisp/mastodon-client.el
@@ -62,14 +62,13 @@
(defun mastodon-client--register ()
"POST client to Mastodon."
- (mastodon-http--post
- (mastodon-http--api "apps")
- `(("client_name" . "mastodon.el")
- ("redirect_uris" . ,mastodon-client-redirect-uri)
- ("scopes" . ,mastodon-client-scopes)
- ("website" . ,mastodon-client-website))
- nil
- :unauthenticated))
+ (mastodon-http--post (mastodon-http--api "apps")
+ `(("client_name" . "mastodon.el")
+ ("redirect_uris" . ,mastodon-client-redirect-uri)
+ ("scopes" . ,mastodon-client-scopes)
+ ("website" . ,mastodon-client-website))
+ nil
+ :unauthenticated))
(defun mastodon-client--fetch ()
"Return JSON from `mastodon-client--register' call."
@@ -154,7 +153,6 @@ Return the plist after the operation."
(defun mastodon-client--form-user-from-vars ()
"Create a username from user variable. Return that username.
-
Username in the form user@instance.com is formed from the
variables `mastodon-instance-url' and `mastodon-active-user'."
(concat mastodon-active-user
@@ -182,7 +180,6 @@ Otherwise return nil."
(defun mastodon-client--active-user ()
"Return the details of the currently active user.
-
Details is a plist."
(let ((active-user-details mastodon-client--active-user-details-plist))
(unless active-user-details
@@ -195,7 +192,6 @@ Details is a plist."
(defun mastodon-client ()
"Return variable client secrets to use for `mastodon-instance-url'.
-
Read plist from `mastodon-client--token-file' if variable is nil.
Fetch and store plist if `mastodon-client--read' returns nil."
(let ((client-details