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

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

[nongnu] elpa/webpaste acf9676 108/298: Added flag to disable failover f


From: ELPA Syncer
Subject: [nongnu] elpa/webpaste acf9676 108/298: Added flag to disable failover for provider
Date: Thu, 9 Dec 2021 18:59:54 -0500 (EST)

branch: elpa/webpaste
commit acf96763d8877ae8dd1caf61052cdf63f057d3bc
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>

    Added flag to disable failover for provider
    
    Added a flag to `webpaste-provider' to disable the failover mechanic
    so one can create private providers which failovers to public
    providers and leaks data.
---
 webpaste.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/webpaste.el b/webpaste.el
index c96d77d..807a07d 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -65,6 +65,7 @@ each run.")
                                   (type "POST")
                                   (parser 'buffer-string)
                                   (post-data '())
+                                  (no-failover nil)
                                   post-field
                                   success)
   "Macro to create the lambda function for a provider.
@@ -82,6 +83,7 @@ Usage:
              `request`. This defaults to 'buffer-string.
 :post-data   Default post fields sent to service. Defaults to nil.
 :post-field  Name of the field to insert the code into.
+:no-failover Set to t to not allow doing failovers, Defaults to nil.
 :success     Callback sent to `request`, look up how to write these in the
              documentation for `request`"
   (lambda (text)
@@ -99,7 +101,8 @@ Usage:
              :error
              (cl-function (lambda (&key error-thrown &allow-other-keys)
                             (message "Got error: %S" error-thrown)
-                            (webpaste-paste-text text))))
+                            (if (eq no-failover nil)
+                                (webpaste-paste-text text)))))
     nil))
 
 



reply via email to

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