From a6b07d2758c185cde10a0b07161c18c288c02cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 28 Dec 2021 22:46:43 +0100 Subject: Pairing: reject and restart --- src/Attach.hs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/Attach.hs') diff --git a/src/Attach.hs b/src/Attach.hs index c220e14..90c9900 100644 --- a/src/Attach.hs +++ b/src/Attach.hs @@ -1,6 +1,8 @@ module Attach ( AttachService, - attachToOwner, attachAccept, + attachToOwner, + attachAccept, + attachReject, ) where import Control.Monad.Except @@ -103,6 +105,12 @@ instance PairingResult AttachIdentity where , pairingHookVerifyFailed = do svcPrint $ "Failed to verify new identity" + + , pairingHookRejected = do + svcPrint $ "Attachment rejected by peer" + + , pairingHookFailed = do + svcPrint $ "Attachement failed" } attachToOwner :: (MonadIO m, MonadError String m) => Peer -> m () @@ -110,3 +118,6 @@ attachToOwner = pairingRequest @AttachIdentity Proxy attachAccept :: (MonadIO m, MonadError String m) => Peer -> m () attachAccept = pairingAccept @AttachIdentity Proxy + +attachReject :: (MonadIO m, MonadError String m) => Peer -> m () +attachReject = pairingReject @AttachIdentity Proxy -- cgit v1.2.3