diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-07-05 17:31:07 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-07-07 20:47:01 +0200 |
commit | 173816717bca3d07e894c0fd8877f84eb9c3a4f7 (patch) | |
tree | 3c0faf258230d4b35fffa793cb6fa3fa80d86b83 /main/Test.hs | |
parent | 24bd419149f5962eed90064753dd958e03863abd (diff) |
Option to configure when tunnel is offered
Diffstat (limited to 'main/Test.hs')
-rw-r--r-- | main/Test.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/main/Test.hs b/main/Test.hs index 62c7229..b07bd87 100644 --- a/main/Test.hs +++ b/main/Test.hs @@ -227,6 +227,11 @@ directMessageAttributes out = DirectMessageAttributes { dmOwnerMismatch = afterCommit $ outLine out "dm-owner-mismatch" } +discoveryAttributes :: DiscoveryAttributes +discoveryAttributes = (defaultServiceAttributes Proxy) + { discoveryProvideTunnel = const True + } + dmReceivedWatcher :: Output -> Stored DirectMessage -> IO () dmReceivedWatcher out smsg = do let msg = fromStored smsg @@ -510,7 +515,7 @@ cmdStartServer = do "attach" -> return $ someServiceAttr $ pairingAttributes (Proxy @AttachService) out rsPeers "attach" "chatroom" -> return $ someService @ChatroomService Proxy "contact" -> return $ someServiceAttr $ pairingAttributes (Proxy @ContactService) out rsPeers "contact" - "discovery" -> return $ someService @DiscoveryService Proxy + "discovery" -> return $ someServiceAttr $ discoveryAttributes "dm" -> return $ someServiceAttr $ directMessageAttributes out "sync" -> return $ someService @SyncService Proxy "test" -> return $ someServiceAttr $ (defaultServiceAttributes Proxy) |