Imām Ibn al-Qayyim (d. 751 AH) said:
Gatherings with fellow Muslim brethren are of two types:
- Gatherings with the purpose of cordiality, friendliness, and passing the time. The harm of this type is greater than its benefit. For, at the very least, it corrupts the heart and wastes time.
- Gatherings formed with the express purpose of cooperation in expounding the means by which salvation itself is attained; advising one another with the truth while exhibiting patience1. This is the greatest and most beneficial of attainments. Although it may be marred by three afflictions:
- The first is false beautification, haughtiness, and putting on airs for the benefit of one another.
- The second is speaking and cohabitation more than is absolutely necessary.
- The third is that these gatherings become attached to unhealthy desires. To the extent that they become habitual. Thus, truncated from their actual, intended purpose.
In general, gatherings and cohabitation are like seeds, either for the benefit of the soul that commands with evil, or for the heart and soul of tranquillity. The end result of the seed that is sown will be reaped either way. So, whoever plants the seeds of righteousness will find only fruits of goodness and piety in return. It is by the wisdom of Allāh that he has made good statements for good people and good people for good statements and vice versa.
 Reference is made here to Sūrah al-ʿAṣr:
وَالْعَصْرِ ﴿١﴾ إِنَّ الْإِنسَانَ لَفِي خُسْرٍ ﴿٢﴾ إِلَّا الَّذِينَ آمَنُوا وَعَمِلُوا الصَّالِحَاتِ وَتَوَاصَوْا بِالْحَقِّ وَتَوَاصَوْا بِالصَّبْرِ ﴿٣﴾
By Al-‘Asr (the time). Verily! Man is in loss, Except those who believe (in Islamic Monotheism) and do righteous good deeds, and recommend one another to the truth (i.e. order one another to perform all kinds of good deeds (Al-Ma’ruf) which Allah has ordained, and abstain from all kinds of sins and evil deeds (Al-Munkar) which Allah has forbidden), and recommend one another to patience (for the sufferings, harms, and injuries which one may encounter in Allah’s Cause during preaching His religion of Islamic Monotheism or Jihad, etc.)
Shaykh ʿAbdullah ibn Ṣāliḥ al-Fawzān said: ‘These four matters facilitate the attainment of success. So if Allāh had revealed only this chapter, the ones who He wanted guidance for would know that there exists no success except by having īmān, engaging in deeds of righteousness, inviting to the truth, and having patience upon that invitation. This Sūrah is a miracle that none could ever produce except for Allāh, the Most High. A single verse clarifies the occupation of the entire muslim ummah, the job of every individual among them—it is to advise with the truth and advise with patience after themselves having īmān and engaging in righteousness.’ See ‘Ḥuṣūl al-Maʾmūl: 25.
Source: Al-Fawāʾid: 71
Translated by: Riyāḍ al-Kanadī