Add a friend without sending a friend request.
This function is used to add a friend in response to a friend request. If the client receives a friend request, it can be reasonably sure that the other client added this client as a friend, eliminating the need for a friend request.
This function is also useful in a situation where both instances are controlled by the same entity, so that this entity can perform the mutual friend adding. In this case, there is no need for a friend request, either.
public_key |
A byte array of length PUBLIC_KEY_SIZE containing the Public Key (not the Address) of the friend to add. |
the friend number on success, an unspecified value on failure. see Tox.friend_add for a more detailed description of friend numbers. |