diff --git a/src/Simplex/Chat/Controller.hs b/src/Simplex/Chat/Controller.hs index 24a91ac0ff..d31ccd7380 100644 --- a/src/Simplex/Chat/Controller.hs +++ b/src/Simplex/Chat/Controller.hs @@ -1151,9 +1151,9 @@ data ChatDeleteMode data ConnectionPlan = CPInvitationLink {invitationLinkPlan :: InvitationLinkPlan} - | CPContactAddress {contactAddressPlan :: ContactAddressPlan} - | CPGroupLink {groupLinkPlan :: GroupLinkPlan} - | CPSimplexName {registration :: NameRegistration} -- the name is not registered or expired, nothing to connect + | CPContactAddress {contactAddressPlan :: ContactAddressPlan, nameRegistration_ :: Maybe NameRegistration} -- nameRegistration_ is set when the target was a name + | CPGroupLink {groupLinkPlan :: GroupLinkPlan, nameRegistration_ :: Maybe NameRegistration} + | CPSimplexName {nameRegistration :: NameRegistration} -- the name is not registered or expired, and no local chat has it | CPError {chatError :: ChatError} deriving (Show) @@ -1165,7 +1165,7 @@ data InvitationLinkPlan deriving (Show) data ContactAddressPlan - = CAPOk {contactSLinkData_ :: Maybe ContactShortLinkData, ownerVerification :: Maybe OwnerVerification, nameOwnerChanged :: Maybe Bool} -- nameOwnerChanged is set when a local chat had this name + = CAPOk {contactSLinkData_ :: Maybe ContactShortLinkData, ownerVerification :: Maybe OwnerVerification} | CAPOwnLink | CAPConnectingConfirmReconnect | CAPConnectingProhibit {contact :: Contact} @@ -1174,7 +1174,7 @@ data ContactAddressPlan deriving (Show) data GroupLinkPlan - = GLPOk {groupSLinkInfo_ :: Maybe GroupShortLinkInfo, groupSLinkData_ :: Maybe GroupShortLinkData, ownerVerification :: Maybe OwnerVerification, nameOwnerChanged :: Maybe Bool} -- nameOwnerChanged is set when a local chat had this name + = GLPOk {groupSLinkInfo_ :: Maybe GroupShortLinkInfo, groupSLinkData_ :: Maybe GroupShortLinkData, ownerVerification :: Maybe OwnerVerification} | GLPOwnLink {groupInfo :: GroupInfo} | GLPConnectingConfirmReconnect | GLPConnectingProhibit {groupInfo_ :: Maybe GroupInfo} @@ -1215,13 +1215,13 @@ connectionPlanProceed = \case ILPOk {} -> True ILPOwnLink -> True _ -> False - CPContactAddress cap -> case cap of + CPContactAddress cap _ -> case cap of CAPOk {} -> True CAPOwnLink -> True CAPConnectingConfirmReconnect -> True CAPContactViaAddress _ -> True _ -> False - CPGroupLink glp -> case glp of + CPGroupLink glp _ -> case glp of GLPOk {} -> True GLPOwnLink _ -> True GLPConnectingConfirmReconnect -> True @@ -1475,7 +1475,7 @@ data ChatError | ChatErrorRemoteHost {rhKey :: RHKey, remoteHostError :: RemoteHostError} deriving (Show, Exception) --- why a resolved SimpleX name could not be used (the name itself resolved; a name that is not registered or expired is CPSimplexName) +-- why a resolved SimpleX name could not be used (the name itself resolved; a name that is not registered or expired is in the plan) data SimplexDomainError = SDENoValidLink -- the name's record has no usable contact/channel link | SDEUnknownDomain -- the resolved link's profile has no name, or a different name