diff options
Diffstat (limited to 'main')
| -rw-r--r-- | main/Main.hs | 3 | ||||
| -rw-r--r-- | main/Test.hs | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/main/Main.hs b/main/Main.hs index 227451f..ec8c98a 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -992,8 +992,7 @@ cmdInviteAccept = do , Just from <- readRefDigest $ T.encodeUtf8 $ "blake2#" <> tfrom , Just token <- parseInviteToken tinv -> do - server <- asks ciServer - acceptInvite server from token + acceptInvite from token _ -> throwOtherError "invalit invite URL" cmdConversations :: Command diff --git a/main/Test.hs b/main/Test.hs index 7fdf5fc..5b6509a 100644 --- a/main/Test.hs +++ b/main/Test.hs @@ -239,9 +239,9 @@ inviteAttributes out = (defaultServiceAttributes Proxy) pid <- asks svcPeerIdentity afterCommit $ outLine out $ "invite-accepted " <> maybe "<missing-token>" showInviteToken inviteToken <> " " <> (BC.unpack $ showRef $ storedRef $ idExtData pid) , inviteHookReplyContact = \token _ -> do - afterCommit $ outLine out $ "invite-accept-done " <> showInviteToken token <> " contact" + afterCommit $ outLine out $ "invite-reply " <> showInviteToken token <> " contact" , inviteHookReplyInvalid = \token -> do - afterCommit $ outLine out $ "invite-accept-done " <> showInviteToken token <> " invalid" + afterCommit $ outLine out $ "invite-reply " <> showInviteToken token <> " invalid" } dmThreadWatcher :: ComposedIdentity -> Output -> DirectMessageThread -> DirectMessageThread -> IO () @@ -1091,5 +1091,5 @@ cmdInviteAccept = do [ tokenText, idref ] <- asks tiParams Just token <- return $ parseInviteToken tokenText Just from <- return $ readRefDigest $ encodeUtf8 idref - Just RunningServer {..} <- gets tsServer - acceptInvite rsServer from token + acceptInvite from token + cmdOut $ unwords [ "invite-accept-done", showInviteToken token ] |