Alqamah said that Abdullah ibn Mas'ud caught hold of his hand saying that the Messenger of Allah ﷺ caught hold of his (Ibn Mas'ud's) hand and taught him the tashahhud during prayer. He then narrated the (well known ) tradition (of tashahhud). This version adds: When you say this or finish this, then you have completed your prayer. If you want to stand up, then stand, and if you want to remain sitting, then remain sitting.
وَأَنَّ رَسُولَ اللَّهِ ﷺ أَخَذَ بِيَدِ عَبْدِ اللَّهِ فَعَلَّمَهُ التَّشَهُّدَ فِي الصَّلاَةِ فَذَكَرَ مِثْلَ دُعَاءِ حَدِيثِ الأَعْمَشِ إِذَا قُلْتَ هَذَا أَوْ قَضَيْتَ هَذَا فَقَدْ قَضَيْتَ صَلاَتَكَ إِنْ شِئْتَ أَنْ تَقُومَ فَقُمْ وَإِنْ شِئْتَ أَنْ تَقْعُدَ فَاقْعُدْ