emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/base32 df9e83880d 044/103: totp-notification-action "copy"


From: ELPA Syncer
Subject: [nongnu] elpa/base32 df9e83880d 044/103: totp-notification-action "copy" should always copy the token
Date: Sat, 10 Feb 2024 13:00:05 -0500 (EST)

branch: elpa/base32
commit df9e83880d6d87bfff32c0b24f4a46953b9f8736
Author: Vivek Das Mohapatra <vivek@collabora.co.uk>
Commit: Vivek Das Mohapatra <vivek@collabora.co.uk>

    totp-notification-action "copy" should always copy the token
    
    Since the "copy" action of our freedesktop notification is
    always an explicit user action it should always copy the
    current token, even if totp-auto-copy-password has been set
    to nil.
---
 totp-auth.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/totp-auth.el b/totp-auth.el
index 68352dd867..9c2eba22e3 100644
--- a/totp-auth.el
+++ b/totp-auth.el
@@ -641,7 +641,8 @@ then wait until it is time to renew the token before doing 
anything."
         (sit-for ttl)
         (setq otp (totp-generate-otp secret)))
       (setq token (nth 0 otp))
-      (totp-update-paste-buffers nil token))
+      (let ((totp-auto-copy-password (or totp-auto-copy-password '(PRIMARY))))
+        (totp-update-paste-buffers nil token)))
     (notifications-close-notification id)))
 
 (defun totp-update-token-notification (id label secret)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]