mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-28 14:14:09 +00:00
core: rework contact requests so that they are always created with entity (#6011)
* core: rework contact requests so that they are always created with entity * remove group requests (revert) * fix schema * remove accepted, set xcontactId * enable tests * fix deduplication, fix address deletion * fix business ldn * disable, add tests * comments, schema * cleanup * fix * plans
This commit is contained in:
@@ -47,7 +47,11 @@ chatProfileTests = do
|
||||
it "deduplicate contact requests" testDeduplicateContactRequests
|
||||
it "deduplicate contact requests with profile change" testDeduplicateContactRequestsProfileChange
|
||||
it "reject contact and delete contact link" testRejectContactAndDeleteUserContact
|
||||
it "delete connection requests when contact link deleted" testDeleteConnectionRequests
|
||||
-- TODO [short links] fix address deletion:
|
||||
-- TODO - either alert user that N chats will be deleted and delete contact request contacts and business chats
|
||||
-- TODO - or allow to accept contact requests for deleted address (remove cascade deletes, rework agent)
|
||||
xit "delete connection requests when contact link deleted" testDeleteConnectionRequests
|
||||
it "connected contact works when contact link deleted" testContactLinkDeletedConnectedContactWorks
|
||||
-- TODO [short links] test auto-reply with current version, with connecting client not preparing contact
|
||||
it "auto-reply message" testAutoReplyMessage
|
||||
it "auto-reply message in incognito" testAutoReplyMessageInIncognito
|
||||
@@ -675,6 +679,30 @@ testDeleteConnectionRequests = testChat3 aliceProfile bobProfile cathProfile $
|
||||
cath ##> ("/c " <> cLink')
|
||||
alice <#? cath
|
||||
|
||||
testContactLinkDeletedConnectedContactWorks :: HasCallStack => TestParams -> IO ()
|
||||
testContactLinkDeletedConnectedContactWorks = testChat2 aliceProfile bobProfile $
|
||||
\alice bob -> do
|
||||
alice ##> "/ad"
|
||||
cLink <- getContactLink alice True
|
||||
bob ##> ("/c " <> cLink)
|
||||
alice <#? bob
|
||||
|
||||
alice ##> "/ac bob"
|
||||
alice <## "bob (Bob): accepting contact request, you can send messages to contact"
|
||||
concurrently_
|
||||
(bob <## "alice (Alice): contact is connected")
|
||||
(alice <## "bob (Bob): contact is connected")
|
||||
alice @@@ [("@bob", "Audio/video calls: enabled")]
|
||||
bob @@@ [("@alice", "Audio/video calls: enabled")]
|
||||
|
||||
alice ##> "/da"
|
||||
alice <## "Your chat address is deleted - accepted contacts will remain connected."
|
||||
alice <## "To create a new chat address use /ad"
|
||||
|
||||
alice <##> bob
|
||||
alice @@@ [("@bob", "hey")]
|
||||
bob @@@ [("@alice", "hey")]
|
||||
|
||||
testAutoReplyMessage :: HasCallStack => TestParams -> IO ()
|
||||
testAutoReplyMessage = testChatCfg2 testCfgNoShortLinks aliceProfile bobProfile $
|
||||
\alice bob -> do
|
||||
|
||||
Reference in New Issue
Block a user