First, when a joke (or something else) is friendly and when it is unfriendly. That could be a big topic, but for now I’ll narrow it down to one situation: when someone asks you to stop.
When someone tells you to stop something, you have a few options. Your can:
- accept their request
- not accept their request (by either continuing what they told you to stop, or complaining about their request)
I’d argue that option 1 is friendly, and option 2 is unfriendly. When someone sincerely tells you to stop something and you continue to do it, it ceases to be friendly. Even if the action looks the same.
Real friendliness includes wanting to avoid annoying or upsetting your friend. It means caring about their feelings, preferences, and how they want to be treated.
In some situations that might be difficult, like when their preference conflict with yours. If the two of you really can’t come up with a solution that you both like, maybe you can’t be friends at all. But that’s unlikely to occur in the case of jokes, which you don’t really need to make. So in this example, I think it’s most reasonable to accept their request.
A second (and related) point: sometimes seemingly identical actions can be morally different.
How can two actions which seem identical be morally different?
If there is some other difference.
For example, if a professional boxer starts boxing unsuspecting people in the street, that’s assault. Their actions alone might look identical to the ethical sport of boxing. But the random people on the street (in my example) did not consent to a boxing match. That’s the key difference.