It's wrong to flirt with your friend's partner.
Ted was hanging out with his friend and his friend's girlfriend.
Ted wants to make a joke with his friends.
Ted tells a clean knock knock joke to his friend and his friend's girlfriend.
Ted makes a flirty joke to the girlfriend of his friend while his friend is standing there.
Ted's friend and his friend's girlfriend both laugh at the joke Ted tells.
Ted's friend punches him in the face and doesn't talk to him in a month.