diff options
| -rw-r--r-- | lisp/mastodon-auth.el | 8 | ||||
| -rw-r--r-- | lisp/mastodon.el | 2 | 
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el index 491d6ae..bad9e08 100644 --- a/lisp/mastodon-auth.el +++ b/lisp/mastodon-auth.el @@ -48,6 +48,7 @@  (defvar mastodon-instance-url)  (defvar mastodon-client-scopes)  (defvar mastodon-client-redirect-uri) +(defvar mastodon-active-user)  (defgroup mastodon-auth nil    "Authenticate with Mastodon." @@ -172,6 +173,13 @@ Generate/save token if none known yet."                 mastodon-auth--token-alist)           (alist-get mastodon-instance-url mastodon-auth--token-alist                      nil nil 'equal)) +        ((null mastodon-active-user) +         ;; user not aware of 2FA related changes and has not set the +         ;; `mastodon-active-user' properly. Make user aware and error +         ;; out. +         (mastodon-auth--show-notice mastodon-auth--user-unaware +                                     "*mastodon-notice*") +         (error "Variables not set properly"))          (t           ;; user access-token needs to fetched from the server and           ;; stored and variables initialised. diff --git a/lisp/mastodon.el b/lisp/mastodon.el index d22c842..6daa755 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -110,7 +110,7 @@ changes to take effect."    :group 'mastodon    :type 'string) -(defcustom mastodon-active-user "user" +(defcustom mastodon-active-user nil    "Username of the active user.  For example, if your mastodon username is  | 
