Al-Mawardi reported: Umar ibn Abdul Aziz, may Allah have mercy on him, said, “Beware of mockery, for it is foolishness that produces malice.” Some of the wise men said, “Indeed, mockery is a form of insult, unless it makes the recipient laugh.” And it is said, “Mockery is only named as such because it misdirects one from the truth.”
Source: Adab al-Dunyā wal-Dīn 1/310
عن الماوردي وَقَالَ عُمَرُ بْنُ عَبْدِ الْعَزِيزِ رحمه الله اتَّقُوا الْمِزَاحَ فَإِنَّهَا حِمْقَةٌ تُورِثُ ضَغِينَةً وَقَالَ بَعْضُ الْحُكَمَاءِ إنَّمَا الْمِزَاحُ سِبَابٌ إلَّا أَنَّ صَاحِبَهُ يُضْحِكُ وَقِيلَ إنَّمَا سُمِّيَ الْمِزَاحُ مِزَاحًا لِأَنَّهُ يُزِيحُ عَنْ الْحَقِّ
1/310 أدب الدنيا والدين