* deprecate XContact * XInfoId * xInfoId tests * merging * saving on connection * connectByAddress * remove old connect * deduplicate contact requests * check on contact acceptance * test * rename response * reuse CRContactRequestAlreadyAccepted * Update src/Simplex/Chat.hs * createConnReqConnection * simplify controller logic * store methods + profile change * index * more indices * unXInfoId * simplify * XInfo with ID -> XContact * sync reply to Connect when contact already exists * update view for sync CRContactAlreadyExists command response Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
1.3 KiB
1.3 KiB
Deduplicate contact requests
- add nullable fields
via_contact_uri_hashandxcontact_idtoconnections - when joining (Connect -> SCMContact)
- generate and save random
xcontact_id - save hash of
AConnectionRequestUriwhen joining via contact uri (AConnectionRequestUri -> ConnectionRequestUri -> CRContactUri) - send random identifier in
XContactasMaybe XContactId - check for repeat join - if connection with such
via_contact_uri_hashhas contact notify user - check for repeat join - check in connections if such contact uri exists, if yes use same identifier; the rest of request can (should) be regenerated, e.g. new server, profile can be required
- generate and save random
- add nullable field
xcontact_idtocontact_requestsand tocontacts(* for auto-acceptance) - on contact request (processUserContactRequest)
- save identifier
- * check if
xcontact_idis incontacts- then notify this contact already exists - when saving check if contact request with such identifier exists, if yes update
contact_request(invId, new profile) - ? remove old invitation - probably not necessarily, to be done in scope of connection expiration
- return from Store whether request is new or updated (Bool?), new chat response for update or same response