The Prophet ﷺ said, "No people sit in a gathering in which they do not remember Allah and do not invoke blessings upon their Prophet except that it will be a source of regret for them. If He wills, He will punish them, and if He wills, He will forgive them."
حدثنا محمد بن بشار حدثنا عبد الرحمن بن مهدي حدثنا سفيان عن صالح مولى التوأمة
عن النبي ﷺ قال ما جلس قوم مجلسا لم يذكروا الله فيه ولم يصلوا على نبيهم إلا كان عليهم ترة فإن شاء عذبهم وإن شاء غفر لهم
[Sahih]. Ahmad reported it: 2/484, from the hadith of Ibn Mahdi, with this wording. Abu Dawud also narrated it, no. 4856, 5059. The hadith has other routes with Nasai in al-Kubra, no. 10237, 10654, and Hakim, 1/492, and Ahmad, 12/22, 432, and others.The hadith of Yusuf bin Yaqub, its chain is sahih. See also no. 3378.