summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2021-12-28 22:46:43 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2021-12-29 23:32:41 +0100
commita6b07d2758c185cde10a0b07161c18c288c02cfc (patch)
tree68683452817d0f91a2aa1110692fbd698b9de769 /src/Main.hs
parente9760baab9608419565e253cae101b24f87eb8e5 (diff)
Pairing: reject and restart
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 3045f94..2c56a00 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -230,9 +230,11 @@ commands =
, ("update-identity", cmdUpdateIdentity)
, ("attach", cmdAttach)
, ("attach-accept", cmdAttachAccept)
+ , ("attach-reject", cmdAttachReject)
, ("contacts", cmdContacts)
, ("contact-add", cmdContactAdd)
, ("contact-accept", cmdContactAccept)
+ , ("contact-reject", cmdContactReject)
, ("discovery-init", cmdDiscoveryInit)
, ("discovery", cmdDiscovery)
, ("ice-create", cmdIceCreate)
@@ -300,6 +302,10 @@ cmdAttachAccept :: Command
cmdAttachAccept = join $ attachAccept
<$> (maybe (throwError "no peer selected") return =<< gets csPeer)
+cmdAttachReject :: Command
+cmdAttachReject = join $ attachReject
+ <$> (maybe (throwError "no peer selected") return =<< gets csPeer)
+
cmdContacts :: Command
cmdContacts = do
args <- words <$> asks ciLine
@@ -318,6 +324,10 @@ cmdContactAccept :: Command
cmdContactAccept = join $ contactAccept
<$> (maybe (throwError "no peer selected") return =<< gets csPeer)
+cmdContactReject :: Command
+cmdContactReject = join $ contactReject
+ <$> (maybe (throwError "no peer selected") return =<< gets csPeer)
+
cmdDiscoveryInit :: Command
cmdDiscoveryInit = void $ do
server <- asks ciServer