mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-04 16:52:01 +00:00
return accepted contact from APIAcceptContact (#250)
This commit is contained in:
+3
-3
@@ -159,12 +159,12 @@ processChatCommand user@User {userId, profile} = \case
|
||||
CTGroup -> pure $ CRChatCmdError ChatErrorNotImplemented
|
||||
CTContactRequest -> pure . CRChatError . ChatError $ CECommandError "not supported"
|
||||
APIAcceptContact connReqId -> do
|
||||
cReq@UserContactRequest {agentInvitationId = AgentInvId invId, localDisplayName = cName, profileId} <- withStore $ \st ->
|
||||
UserContactRequest {agentInvitationId = AgentInvId invId, localDisplayName = cName, profileId, profile = p} <- withStore $ \st ->
|
||||
getContactRequest st userId connReqId
|
||||
procCmd $ do
|
||||
connId <- withAgent $ \a -> acceptContact a invId . directMessage $ XInfo profile
|
||||
withStore $ \st -> createAcceptedContact st userId connId cName profileId
|
||||
pure $ CRAcceptingContactRequest cReq
|
||||
acceptedContact <- withStore $ \st -> createAcceptedContact st userId connId cName profileId p
|
||||
pure $ CRAcceptingContactRequest acceptedContact
|
||||
APIRejectContact connReqId -> do
|
||||
cReq@UserContactRequest {agentContactConnId = AgentConnId connId, agentInvitationId = AgentInvId invId} <-
|
||||
withStore $ \st ->
|
||||
|
||||
Reference in New Issue
Block a user