aboutsummaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-02-03 15:06:17 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-02-03 15:06:40 -0400
commit0951fce8102a1a9c28c8951fae89c4db144eec78 (patch)
tree283e38921b2ec98b4d28c3a0f960017833eb7cd0 /Utility
parent71a21addf2ee7c854b22eef7e2255102853948c0 (diff)
wormhole pairing appid flag day 2021-12-31
Wormhole pairing will start to provide an appid to wormhole on 2021-12-31. An appid can't be provided now because Debian stable is going to ship a older version of git-annex that does not provide an appid. Assumption is that by 2021-12-31, this version of git-annex will be shipped in a Debian stable release. If that turns out to not be the case, this change will need to be cherry-picked into the git-annex in Debian stable, or its wormhole pairing will break. This commit was sponsored by Thomas Hochstein on Patreon.
Diffstat (limited to 'Utility')
-rw-r--r--Utility/MagicWormhole.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Utility/MagicWormhole.hs b/Utility/MagicWormhole.hs
index 6d2df81e2..f9e694e28 100644
--- a/Utility/MagicWormhole.hs
+++ b/Utility/MagicWormhole.hs
@@ -18,6 +18,7 @@ module Utility.MagicWormhole (
waitCode,
sendCode,
WormHoleParams,
+ appId,
sendFile,
receiveFile,
isInstalled,
@@ -87,6 +88,11 @@ sendCode (CodeProducer p) = putMVar p
type WormHoleParams = [CommandParam]
+-- | An appid should be provided when using wormhole in an app, to avoid
+-- using the same channel space as ad-hoc wormhole users.
+appId :: String -> WormHoleParams
+appId s = [Param "--appid", Param s]
+
-- | Sends a file. Once the send is underway, and the Code has been
-- generated, it will be sent to the CodeObserver. (This may not happen,
-- eg if there's a network problem).