Exemple #1
0
 /// <summary>
 /// Resolve a friend request sent to the current user
 /// </summary>
 /// <param name="id">The Id of the user who sent the request</param>
 /// <param name="accept">Whether the request has been accepted</param>
 /// <param name="onComplete">**Optional** Callback for if the request was successfully resolved</param>
 public void ManageFriendRequest(int id, bool accept, Action <bool> onComplete = null)
 {
     UserResponseRelationshipStatus.UpdateRequest(id, accept, result =>
     {
         RefreshRelationships(refresh =>
         {
             onComplete?.Invoke(result && result);
         });
     });
 }
Exemple #2
0
 /// <summary>
 /// Cancel a friend request sent by the current user
 /// </summary>
 /// <param name="id">The Id of the user who received the request</param>
 /// <param name="onComplete">**Optional** Callback for if the request was successfully cancelled</param>
 public void CancelSentFriendRequest(int id, Action <bool> onComplete = null)
 {
     UserResponseRelationshipStatus.CancelSentRequest(id, result =>
     {
         RefreshRelationships(refresh =>
         {
             onComplete?.Invoke(result && result);
         });
     });
 }
Exemple #3
0
 /// <summary>
 /// Send friend request to another user
 /// </summary>
 /// <param name="id">The id of the user to add</param>
 /// <param name="onComplete">**Optional** Callback for if the request was successfully performed</param>
 public void AddFriend(int id, Action <bool> onComplete = null)
 {
     UserResponseRelationshipStatus.Add(id, result =>
     {
         RefreshRelationships(refresh =>
         {
             onComplete?.Invoke(result && result);
         });
     });
 }