It is recommended if a Muslim sits in any gathering – no matter what kind of gathering it is – to end by reciting the expiation for the gathering before he gets up to leave
The expiation for a gathering is a dhikr that is mentioned in the Prophet’s Sunnah. It is to be recited after every gathering as an expiation for sins and idle talk. It is: “ Subhanak Allahumma wa bi hamdika, ash-hadu an la ilaha illa anta, astaghfiruka wa atubu ilayka (Glory and praise be to You, O Allah; I bear witness that there is no god worthy of worship except You; I ask for Your forgiveness and I repent to You).” The Prophet (blessings and peace of Allah be upon him) explained that the expiation for the gathering should be recited at the end of every gathering in which a man sits, whether it is a gathering of dhikr or a gathering in which there was a great deal of idle talk. If it was a gathering of dhikr, that will be recorded for him as a righteous deed, and if it was otherwise, that will be an expiation for it.