コード例 #1
0
        /// <summary>
        ///     Sends a friend request from user1 to user2
        /// </summary>
        /// <param name="user1">user that sends the request</param>
        /// <param name="user2">user that receives the request</param>
        public static bool SendFriendRequest(int user1, int user2)
        {
            if (ExistsFriendRequest(user2, user1))
            {
                DbConnections.AcceptFriendRequest(user2, user1);
            }
            else if (!ExistsFriendRequest(user1, user2))
            {
                return(DbConnections.SendFriendRequest(user1, user2));
            }

            return(true);
        }