When the Messenger of Allah ﷺ intended to get up from the assembly he used to say in the last. Glory be to Thee. O Allah, and I begin with praise of Thee, I testify that there is no god but Thou; I ask Thy pardon, and return to Thee in repentance. The man asked: Messenger of Allah! you utter the words now which you did not do in the past? He replied: (This is an) atonement for what takes place in the assembly. (Using translation from Abū Dāʾūd 4859)
لَمَّا كَانَ بِآخِرَةٍ كَانَ رَسُولُ اللهِ ﷺ إِذَا جَلَسَ فِي الْمَجْلِسِ فَأَرَادَ أَنْ يَقُومَ قَالَ سُبْحَانَكَ اللهُمَّ وَبِحَمْدِكَ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا أَنْتَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ فَقَالُوا يَا رَسُولَ اللهِ إِنَّكَ تَقُولُ الْآنَ كَلَامًا مَا كُنْتَ تَقُولُهُ فِيمَا خَلَا قَالَ هَذَا كَفَّارَةُ مَا يَكُونُ فِي الْمَجْلِسِ