As the people were engaged in the morning prayer a man came to them. The rest of the hadith is the same.
Sahih Muslim Book 5, Hadith 19
← Previous Hadith
As the people were praying at Quba' a man came to them and said: It has been revealed to file Messenger of Allah (ﷺ) during the night and he has been directed to turn towards the Ka'ba. So turn towards it. Their faces were towards Syria and they turned round towards Ka'ba.
Sahih Muslim Book 5, Hadith 18 Next Hadith → The Messenger of Allah (ﷺ) used to pray towards Bait-ul-Maqdis, that it was revealed (to him):" Indeed We see the turning of the face to heaven, wherefore We shall assuredly cause thee to turn towards Qibla which shall please thee. So turn thy face towards the sacred Mosque (Ka'ba)" (ii. 144). A person from Banu Salama was going; (he found the people) in ruk'u (while) praying the dawn prayer and they had said one rak'ah. He said in a loud voice: Listen! the Qibla has been changed and they turned towards (the new) Qibla (Ka'ba) in that very state.
Sahih Muslim Book 5, Hadith 20
Sahih Muslim Book 5, Hadith 18 Next Hadith → The Messenger of Allah (ﷺ) used to pray towards Bait-ul-Maqdis, that it was revealed (to him):" Indeed We see the turning of the face to heaven, wherefore We shall assuredly cause thee to turn towards Qibla which shall please thee. So turn thy face towards the sacred Mosque (Ka'ba)" (ii. 144). A person from Banu Salama was going; (he found the people) in ruk'u (while) praying the dawn prayer and they had said one rak'ah. He said in a loud voice: Listen! the Qibla has been changed and they turned towards (the new) Qibla (Ka'ba) in that very state.
Sahih Muslim Book 5, Hadith 20