R. Shimon b. Elazar says:
Don't try to appease your friend when he is brimming with anger, and don't console him while he is still tending to the burial of a relative… and don't try to peer at him when he is encountering an embarrassing situation.