branch: elpa/mastodon
commit 7f3516e9d80b2d59306ca11fe4415bd7050e70ff
Author: marty hiatt <martianhia...@disroot.org>
Commit: marty hiatt <martianhia...@disroot.org>

    client: store token, revert to using full handle for plstore key.
    
    - auth source still uses just the username, as it has host too.
---
 lisp/mastodon-client.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lisp/mastodon-client.el b/lisp/mastodon-client.el
index 13df863f43..a19cd3a2f8 100644
--- a/lisp/mastodon-client.el
+++ b/lisp/mastodon-client.el
@@ -142,16 +142,15 @@ If `mastodon-auth-encrypt-access-token', encrypt it in 
the plstore.
 If `mastodon-auth-use-auth-source', encrypt it in auth source file."
   (let* ((user-details (mastodon-client--make-user-details-plist))
          (plstore (plstore-open (mastodon-client--token-file)))
-         (username (plist-get user-details :username))
+         (username (mastodon-client--form-user-from-vars))
          (key (concat "user-" username))
          (print-length nil)
          (print-level nil))
     (cond (mastodon-auth-use-auth-source
            ;; auth-source:
-           (let ((handle (plist-get user-details :username)))
-             (mastodon-auth-source-token
-              mastodon-instance-url handle token :create)
-             (plstore-put plstore key user-details nil)))
+           (mastodon-auth-source-token
+            mastodon-instance-url username token :create)
+           (plstore-put plstore key user-details nil))
           ;; plstore encrypted:
           (mastodon-auth-encrypt-access-token
            (plstore-put plstore key user-details `(:access_token ,token)))

Reply via email to