Narrated by Abī Dharr al-Ghifārī (رضي الله عنه) who said: The Messenger of Allāh (صلى الله عليه وسلم) said: “Fear Allāh wherever you may be. Follow every misdeed with one of goodness. And treat mankind in a kind, equitable, righteous manner.”
Narrated by al-Imām Aḥmad and al-Tirmidī1
Imām ‘Abd al-Raḥmān ibn Nāṣir al-Saʿdī (d. 1391 AH) comments:
When he (صلى الله عليه وسلم) mentions that which is the right of Allāh, in the form of his admonishment towards having taqwá, which encompasses the adoption of the correct religious creed and acting in accordance with it, whether those actions are seen or unseen—he then said: “And treat mankind in a kind, equitable, righteous manner.”
The very first way righteous manners are exemplified is through completely refraining from harming mankind in any way while also forgiving their shortcomings and any harm they have caused you. Then, treating them with righteousness whether this be in the form of speech or action. The most exclusive form of these righteous manners takes the form of encompassing forbearance of mankind’s treatment of you, to show patience when dealing with them, never being annoyed or bothered by them. It is to show happiness on your face when meeting them, being compassionate when speaking to them, directing words of kindness and beauty towards them such that they feel comfortable and familiar when they sit with you. That you represent a means of happiness for them, a refuge from loneliness and the hardship associated with shyness. Just as it is is befitting to sometimes tell jokes2 if this represents a greater good. Although it is inappropriate for this to be overdone. For jokes in speech are like salt in food. If it is ever completely devoid or added over a particular limit, it becomes blameworthy.
From good manners is that you treat every individual with what is befitting and appropriate for them and their condition—whether they be young or old, an intellectual or a fool, a person with knowledge or one of ignorance.
So whoever fears Allāh, and fulfils the duties and rights of that taqwá while showing good treatment to the varying categories of mankind—then he has captured goodness in its entirety. For he has successfully fulfilled the right of Allāh and the rights of His servants. He is among the doers of good in relation to his worship of Allāh while also being a doer of good to the servants of Allah.
 Ḥasan: narrated by al-Imām Aḥmad 5: 153, 157, 177, 236 and al-Tirmidhī: 1987. Graded Ḥasan by al-Tirmidhī. See Jāmiʿ al-ʿUlūm: ḥadīth no. 18.
 Translator note: Halāl jokes being referred to here include those that do not hold lies, as the Prophet (صلى الله عليه وسلم) said: “Indeed, I joke but I only speak the truth.” Narrated by al-Tirmidhī: 1990 and graded Ḥasan by al-Suyūtī, al-Haythamī and others, See al-Manāhil al-Ṣafā: 233. Ibn Ḥajar said: As for the recommended variant of jokes, it refers to that which occurs amongst family, relatives, brothers, and friends with the condition that it causes no harm to anyone. Nor does it degenerate them in any way. Rather, its purpose is only to sow feelings of comfort and tranquillity. The Messenger of Allāh (صلى الله عليه وسلم) used to joke on rare occasions for the achievement of this greater good—the derivation of comfort and tranquillity. It is, therefore, sunnah and recommended to do so [for this purpose].” See Fatḥ al-Bārī 10: 526 and Tuḥfah al-Aḥwazī 6:125.
Source: Bahjah Qulūb al-Abrār: 55-57
Translated by: Riyāḍ al-Kanadī