Description
As far as I know, when user A adds user B, user B gets repeat friend request packets, and toxcore filters out repeat requests by key.
In qTox, there is the ability to "reject" a friend request, which basically hides the request, but doesn't delete it from received_requests in toxcore. This means that as the request keeps arriving, it keeps getting filtered out in toxcore.
There's some undesired behaviour that comes out of this:
- If user B rejects the request, then closes and re-opens the client, wiping toxcore's received_requests, they will receive the same friend request since it's no longer being filtered
- If user B rejects the request, doesn't close their client for a long time, then user A sends a new request a couple weeks later, user B will not receive the second request, because it will be filtered out by toxcore as a duplicate.
I think the repeat messages are just from the spec exponential repeat of friend requests (https://toktok.ltd/spec.html#friend-requests). The stated reason is "... so friend requests get resent but eventually get resent in intervals that are so big that they essentially expire. The sender has no way of knowing if a peer refuses a friend requests which is why friend requests need to expire in some way".
If instead of the exponential backoff resending, toxcore could support a reject response to the asker, without exposing long term public key, or the requested could send once and have a delivery guarantee by the onion network so that filtering on receiving side wouldn't be required, it would solve problem 1, and with a small change in qTox to delete the friend, it would also solve problem 2
If it is possible to prevent the repeat friend request messages, there's then a problem trying to reject the friend request from a client, because the friend request doesn't have a friend ID yet, and the only way to delete the friend request from toxcore is by deleting the friend, which requires the friend ID.