mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-02 13:35:14 +00:00
Accepting a contact request that was already accepted reached the user as error agent CMD PROHIBITED SEInvitationNotFound acceptContact, invitationId = "..." The chat layer cannot tell that case from an accept that failed: the contact connection is committed at ConnNew before acceptContact is called, and a successful accept leaves it at ConnNew as well, until the peer's CONF arrives. A guard on the connection would reject retrying an accept that failed with a network error - covered by "retry connecting via contact link". The agent can tell, because it owns the invitation and clears it in the right order: getInvitation requires accepted = 0, joinConn can fail, and only then does acceptInvitation set accepted = 1. So SEInvitationNotFound means the request was accepted, while a join that failed leaves the invitation for the retry to find. Its CMD PROHIBITED is translated rather than re-derived; within acceptContact' that error has no other source.