Implementation of sendFriendRequest function