If you want to associate friends with your users, you must handle friend management in your app.
Once two users are friends (i.e. they have accepted each other as friends), then you can associate them as friends in CometChat.
The following table lists the properties that the Friends API supports
|accepted||array of strings||(optional) Indicates an array of UIDs that are to be made friends.|
Maximum of 25 users can be passed in the accepted array.
The following table lists the most common error codes the Friend API may return in case of an error.
|ERR_ALREADY_FRIEND||Indicates that the users are already friends.|
|ERR_NOT_A_FRIEND||Indicates unfriending non-friended users.|
|ERR_CANNOT_FORM_SELF_RELATION||Indicates user cannot friend himself.|
|ERR_FAILED_TO_ADD_FRIEND||Indicates that the API has failed to add a friend.|