What does this mean? Whoever has pain is the person

what does this mean? Whoever has pain is the person who says they are in pain?

У кого что болит, тот о том и говорит= If someone has a pain, he speaks first of all about this pain.
It’s like a joke in Russian.